By: D S user 12 Sep 2016 at 6:52 a.m. CDT

5 Responses
D S gravatar
I believe attributes need to be requested from userinfo endpoint, can you please provide some sample code for requesting attributes from userinfo endpoint?

By Aliaksandr Samuseu staff 12 Sep 2016 at 7:48 a.m. CDT

Aliaksandr Samuseu gravatar
Hi. Not sure what example code do you need. Gluu follows OIDC specs strictly, so if you need example of the request itself, you can check core OIDC spec. Sending this request is as simple as sending HTTP request to a web server, so you can use any code doing this you can find with google. You could also check our RP implementation in python (or other languages) [here](https://github.com/GluuFederation/oxd-python/tree/master/oxdpython), though it's a bit more complex than simple code sending request to OP. Best regards, Alex.

By D S user 12 Sep 2016 at 8:01 a.m. CDT

D S gravatar
Do the claim attributes need to be set as 'Usage Type: OpenID' in order to be retrieved when requesting from userinfo endpoint or can they be set as 'Not defined' and they will still be able to be retrieved? Also, does the view type of the attribute need to be set in order to be retrieved from userinfo endpoint?

By Sahil Arora user 12 Sep 2016 at 8:07 a.m. CDT

Sahil Arora gravatar
There is good test in oxauth-client to show how to do that: https://github.com/GluuFederation/oxAuth/blob/master/Client/src/test/java/org/xdi/oxauth/ws/rs/UserInfoRestWebServiceHttpTest.java Please take a look on various methods per your requirement

By D S user 12 Sep 2016 at 8:10 a.m. CDT

D S gravatar
Hi, Thanks for that. Do the claim attributes need to be set as 'Usage Type: OpenID' in order to be retrieved when requesting from userinfo endpoint or can they be set as 'Not defined' and they will still be able to be retrieved? Also, does the view type of the attribute need to be set in order to be retrieved from userinfo endpoint?

By Michael Schwartz Account Admin 12 Sep 2016 at 3:01 p.m. CDT

Michael Schwartz gravatar
You should maybe think about using oxd: [http://oxd.gluu.org](http://oxd.gluu.org) It's commercial client software, but the good thing is that it's supported by Gluu. There is actually plenty of client code you can find in the Gluu Github: 1. [oxauth-rp](https://github.com/GluuFederation/oxAuth/tree/master/RP) Deployed as an optional component in Gluu Server CE (oxauth-rp), this is a web interface that has all OpenID Connect basic features. 2. [oxd](https://github.com/GluuFederation/oxd) The code for our OpenID Connect middleware 3. [oxAuth tests](https://github.com/GluuFederation/oxAuth/tree/master/Server/src/test/java/org/xdi/oxauth/ws/rs) Test code for the oxAuth server 4. [Third Party OpenID Connect Libraries](http://openid.net/developers/libraries/) 5. [Blog from Nat Sakimura](http://nat.sakimura.org/2012/03/31/openid-connect-stripped-down-to-just-authentication)