OpenID-Connect-PHP icon indicating copy to clipboard operation
OpenID-Connect-PHP copied to clipboard

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

Open ricklambrechts opened this issue 2 years ago • 1 comments

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

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

ricklambrechts avatar Jun 13 '22 11:06 ricklambrechts

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

ricklambrechts avatar Sep 16 '22 14:09 ricklambrechts

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.

DeepDiver1975 avatar Sep 28 '22 07:09 DeepDiver1975

@DeepDiver1975 thanks. I updated the code

ricklambrechts avatar Oct 06 '22 14:10 ricklambrechts

@DeepDiver1975 Any chance of getting this merged in?

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

apeisa avatar Dec 14 '22 07:12 apeisa