FusionAuth / fusionauth-client-builder

The FusionAuth client library builder
https://fusionauth.io/
Apache License 2.0
6 stars 24 forks source link

Userinfo endpoint #20

Closed AliMirlou closed 4 years ago

AliMirlou commented 4 years ago

It would be great if someone could implement OIDC Userinfo endpoint in the clients, since it's a common one to call. I tried to fork the client builder and implement it myself to open a pull request but I couldn't figure out how authorization headers are specified in the builder's specification language.

robotdan commented 4 years ago

Any method naming suggestions?

retrieveUserInfoFromAccessToken which would end up being retrieve_user_info_from_access_token in Python for example.

Or userInfo which would be user_info in Python.

robotdan commented 4 years ago

@AliMirlou

For your reference in case you want to take a crack at a PR in the future, here is the client builder commit and the resulting build change for the python lib.

https://github.com/FusionAuth/fusionauth-client-builder/blob/24b90426857d1a3e76f716f13f0c78b3d08b52c2/src/main/api/userInfo.json

https://github.com/FusionAuth/fusionauth-python-client/commit/a162ec281080fde7f6731da22793168882fdbc11

AliMirlou commented 4 years ago

@robotdan Thanks a lot. Got the answer to my question about headers.

About the method name, retrieveUserInfoFromAccessToken looks great.

I checked the commits and encountered a question. This endpoint can be called either with GET or POST and you chose POST. Is there a particular reason for that?

robotdan commented 4 years ago

@AliMirlou no reason really, probably because I copy / pasted the JSON file and didn't change it to GET. :-) But now that you mention it, I may change it to GET.

I currently have it checked in as userInfo (user_info in python). I'll check with the rest of the team to see if they prefer that over retrieveUserInfoFromAccessToken.

robotdan commented 4 years ago

Renamed to retrieveUserInfoFromAccessToken.

robotdan commented 4 years ago

Thanks for your contributions to FusionAuth @AliMirlou , we appreciate the input!