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

Added userInfo response type check to handle signed and encrypted res… #305

Merged
merged 8 commits into from
Dec 14, 2022

Conversation

ricklambrechts
Copy link
Contributor

@ricklambrechts ricklambrechts commented Jun 13, 2022

This pull request will add support for signed and/or encrypted UserInfo response.
https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.5.3.2

Added response contentType field to hold value of the latest content type
Added jweResponseHandler so the package user can set an handler to decrypt the JWE
Handle signed jwt response from user info endpoint

Added support for encrypted id_token.
According to the docs, it is possible that the id token is encrypted. I added additional code that will decrypt the id_token when it is an JWE.

List of common tasks a pull request require complete

  • Changelog entry is added or the pull request don't alter library's functionality

@ricklambrechts
Copy link
Contributor Author

@DeepDiver1975 do we want to use an interface or should we use a callback like in pr #322?

@DeepDiver1975
Copy link
Collaborator

My personal answer would be:
protected function which has the default handling implemented (like doing nothing)
anybody who wants to have a different behavior could then sub class the client and add what ever implementation is desired.

Alternative would be to use a callback just like done in any other place - just to make sure we are not mixing too much concepts.

@ricklambrechts
Copy link
Contributor Author

@DeepDiver1975 thanks. I updated the code

@teemukolehmainen-howspace
Copy link

teemukolehmainen-howspace commented Nov 17, 2022

@DeepDiver1975 Any chance of getting this merged in?

@apeisa
Copy link

apeisa commented Dec 14, 2022

@DeepDiver1975 this would be very helpful for us as well.

@DeepDiver1975 DeepDiver1975 merged commit 102a5bb into jumbojett:master Dec 14, 2022
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

Successfully merging this pull request may close these issues.

None yet

4 participants