On Wed, Jan 13, 2016 at 6:20 PM, Aritz Maeztu <amaeztu@tesicnor.com> wrote:

ResponseEntity rssResponse = template.exchange(
        "http://192.168.0.230:8080/auth/realms/master/protocol/" +
                "openid-connect/token?grant_type=authoritation_code&client_id=web_service&code="+accessCode,
        HttpMethod.POST,
        null,
        Object.class);


It also looks like you have a typo in your URL. It should be: grant_type=authorization_code.

And also I would suggest not to use master realm for your app, but create a new realm. Even for development.