[keycloak-dev] Getting User Details from a Token (Node.js Adapter)

Evan Shortiss eshortis at redhat.com
Wed Oct 2 07:45:44 EDT 2019


Hey folks,

Does the Node.js module have documented features for accessing token
properties?

My particular use case is that I'd like to retrieve the user's username. I
can access it via *req.kauth.grant.access_token.content.preferred_username* but
it feels like this is an interface that could be changed since it's not
documented AFAICT.

Is there a recommended approach for doing this? Is there any plan to add
features such as *req.kauth.getTokenContent()* or similar?

Thanks


-- 

Evan Shortiss

Technical Marketing Manager

Red Hat NA <https://www.redhat.com/>

Los Angeles

evan.shortiss at redhat.com
M: +1-781-354-2834     IM: evanshortiss
<https://www.redhat.com/>


More information about the keycloak-dev mailing list