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

Get UserInfo in JWT format #434

Open
JaykobJ opened this issue Jul 5, 2023 · 0 comments
Open

Get UserInfo in JWT format #434

JaykobJ opened this issue Jul 5, 2023 · 0 comments

Comments

@JaykobJ
Copy link

JaykobJ commented Jul 5, 2023

Is your feature request related to a problem? Please describe.

Current implementation on getting UserInfo data form /userinfo endpoint only support for fetching data in JSON format. In Keycloak it is possible to also receive UserInfo in JWT format.
This can be configured at client -> advanced options -> under "Fine grain OpenID Connect configuration" set value for "User info signed response algorithm".
Currently if the UserInfo data is set to be JWT, then gocloak returns error since the response is invalid JSON format.

Describe the solution you'd like
I found that the issue is in GetRawUserInfo functions SetResult(&result) call. It tries to unmarshal the response but fails since it is getting a non JSON object in the response.

It would be nice if the GetRawUserInfo function could handle both JSON and JWT UserInfo formats.

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

No branches or pull requests

1 participant