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

B2C - Issue when Getting JWT Verification Keys #172

Closed
wuangyalin opened this issue Oct 24, 2022 · 1 comment · Fixed by #184
Closed

B2C - Issue when Getting JWT Verification Keys #172

wuangyalin opened this issue Oct 24, 2022 · 1 comment · Fixed by #184

Comments

@wuangyalin
Copy link

Hi There,

I am currently trying the experimental feature B2C to my existing system.
I noticed there are two issues in the getJwtVerificationKeys function under the Azure.php file.

  1. The keys returned from my B2C application doesn't include alg attributes so I have to change the code $pkey_object = JWK::parseKey($keyinfo); to $pkey_object = JWK::parseKey($keyinfo, 'RS256'); to default the algorithm.
  2. The $pkey_object returned from the JWK::parseKey method is type of Key so I need to change the code $pkey_array = openssl_pkey_get_details($pkey_object); to $pkey_array = openssl_pkey_get_details($pkey_object->getKeyMaterial());.

After the above change I can get the B2C up and running.

Thanks.

@arakonn2000
Copy link

Many thanks. Really helped me to proceed.
+1 to add this change in the next release

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 a pull request may close this issue.

2 participants