By: Mohan Venkataramana user 12 Mar 2019 at 12:55 p.m. CDT

2 Responses
Mohan Venkataramana gravatar
I am trying to get user information of the logged in user from the Gluu server. When I try in my python program: (oxd-server 3.1.4, python 2.7) claims = oxc.get_user_info(tokens['access_token']) print claims The output only lists one value, sub: {u'sub': [u'xW8S3Ksgv-R5uE6P00v9tIcAcgUOgBPvfsqGBE0h4xU']} even though in the user record on the Gluu server other fields (first name etc) are defined. Is there something I need to do/setup to be able to get the other user information fields to be returned? I looked at various Gluu documents but could not find a resolution. Thanks for your help. Mohan.

By Mohan Venkataramana user 18 Mar 2019 at 6:14 p.m. CDT

Mohan Venkataramana gravatar
I am answering my own question - Thanks to Mike Schwartz of Gluu who helped to resolve this issue. I have described what i did, and hopefully this will help someone else in future.. His answer was: "The quick answer to your question is that you probably did not release the right scopes to the client. View the Client in oxTrust, and make sure you release the profile and email scope." I logged in as admin to the Gluu Server dashboard, selected OpenID Connect at the left menu, and further clicked on the Clients tab. There were several items listed there, I selected oxdpython Flask Example App entries (there were three entries and I made the following changes to all three) On the standard settings page, there was a entry called scopes, and a button "add Scopes" - I clicked it and it opened up a set of values with check boxes, I selected email and user_name and clicked ok, and then update client. When I reran the python/flask/oxdpython app from the browser, I was able to obtain the userid as well as email fields from the login_callback function response. Again, Thanks Mike.

By Rajat kumar user 15 Oct 2020 at 2:14 a.m. CDT

Rajat kumar gravatar
I am trying to do something similar in nodejs. Can you please share your code? Regards, Rajat KP