B2C - Issue when Getting JWT Verification Keys
wuangyalin opened this issue · 1 comments
wuangyalin commented
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.
- 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. - The
$pkey_object
returned from theJWK::parseKey
method is type ofKey
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 commented
Many thanks. Really helped me to proceed.
+1 to add this change in the next release