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 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.
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 theAzure.php
file.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.$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.