[keycloak-user] Authorization Code Grant
paolo lizarazu
polochepu at gmail.com
Mon Apr 16 18:59:42 EDT 2018
Hi All, I have a keycloak running with a test realm and someone client,
this has an admin/admin user, I want to use Authorization Code
Grant(seems direct
access grant in keycloak) but not sure if I am misunderstanding something
my Application is a desktop one that has its own login window, inside this
i am sending a request to get a token like
POST http://localhost:9080/auth/realms/test/protocol/openid-connect/token
wit body
grant_type=password&clientid=someone&username=admin&password=admin
this is returning the json with access_token, expires_in, refresh_toke, etc
seems all good.
from here if I want to get user info
http://localhost:9080/auth/realms/test/protocol/openid-connect/userinfo
setting header authorization=Bearer code_token i am getting 401
unauthorized with
{
"error": "invalid_token",
"error_description": "Token invalid: Token is not active"
}
should I do a new request with
grant_type=authorization_code&code=access_token to interchange the current
for a long one? and handle the refresh token later?
sorry if this is a common or simple issue i am not getting working.
More information about the keycloak-user
mailing list