[keycloak-user] Extract Subjectid from token in JaxRS Service

Mike Love mike.love at symbiotics.co.za
Wed Feb 18 08:33:14 EST 2015


Hi,

I am successfully authenticating an AngularJS client calling REST Services.

The token is validated as expected after login. On calling the REST service,
the authorization hearer (Bearer token) is available as HTTP Header as
expected.

Now, in the REST Service processing I want to extract the UserId (SubjectId)
so that I can lookup additional information before continuing with
processing.

I have seen that the JS adapter has a keycloak object that provides access
the this information, is there a similar Java helper class to extract this
information?


Regards,
Mike Love




-- 
********************************************************************************
This email and any accompanying attachments may contain confidential and 
proprietary information. This information is private and protected by law 
and, accordingly, if you are not the intended recipient, you are requested 
to delete this entire communication immediately and are notified that any 
disclosure, copying or distribution of or taking any action based on this 
information is prohibited. 

Emails cannot be guaranteed to be secure or free of errors or viruses. The 
sender does not accept any liability or responsibility for any 
interception, corruption, destruction, loss, late arrival or incompleteness 
of or tampering or interference with any of the information contained in 
this email or for its incorrect delivery or non-delivery for whatsoever 
reason or for its effect on any electronic device of the recipient. 

********************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150218/3a00e3ed/attachment-0001.html 


More information about the keycloak-user mailing list