[keycloak-user] Regarding keycloak REST api

Sharlet Wilson wilson.sharlet at gmail.com
Mon Nov 12 05:48:27 EST 2018


Hi, I'm directly using the jboss/keycloak docker image to run Keycloak.

I created a 'quickstart' realm and a 'service-nodejs' client in the
Keycloak server. I get the access token by sending a POST request to
/auth/realms/<realm-name>/protocol/openid-connect/token API. (For this, I
had to set the Access Type of the client to 'confidential' on the Keycloak
server). Now I'm trying to access the protected route of the example
http://localhost:3000/service/secured by setting the Authorization header
to the access token I got above, but it still gives me 'Access denied'. Am
I doing anything wrong here?

Regards,
Sharlet Hannah Wilson


On Mon, Nov 12, 2018 at 1:37 PM Sharlet Wilson <wilson.sharlet at gmail.com>
wrote:

> Hi,
>
> I have a user's keycloak access token on my backend Node.js application.
> Would like to know how I can use it to authorize a user to access my custom
> REST apis. (I am using the /auth/realms/<realm-name>/protocol/openid-connect/token
> api to get the user's access token).
>
> Regards,
> Sharlet Hannah Wilson
>


More information about the keycloak-user mailing list