Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add helper for fetching userinfo (OIDC) #75

Open
jberger opened this issue Jul 28, 2023 · 5 comments
Open

Add helper for fetching userinfo (OIDC) #75

jberger opened this issue Jul 28, 2023 · 5 comments

Comments

@jberger
Copy link
Contributor

jberger commented Jul 28, 2023

In OIDC the userinfo may be included in the authorization response/id token but it does not have to be so. For example Azure AD can provide some claim information in the authorization response/id token but to get the full set of information you need to call that userinfo_url fetched from the warmup.

Luckily the request is pretty easy: https://openid.net/specs/openid-connect-core-1_0.html#UserInfo

@jberger
Copy link
Contributor Author

jberger commented Jul 29, 2023

Ok, well after some debugging I was able to get what I needed from the id token after all. Still it might be nice to have easier access to the userinfo endpoint

@tomk3003
Copy link

@jberger could you please share what you did to extract the userinfo from the id token?

@jberger
Copy link
Contributor Author

jberger commented Feb 23, 2024

my $oidc_user = $c->oauth2->jwt_decode(deft => data => $provider_res->{id_token});

@jberger
Copy link
Contributor Author

jberger commented Feb 23, 2024

As OIDC is becoming even more commonplace, I would support more documentation and/or more helpers towards OIDC use here.

@tomk3003
Copy link

tomk3003 commented Feb 24, 2024

Thanks, I'll try that. And thanks for the info about 'response_type' in #70.
I had started to patch this myself, I because keycloak also insists on having it set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants