Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/Service/DiscoveryService.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,12 @@ private function fixJwksAlg(array $jwks, string $jwt): array {
}

foreach ($jwks['keys'] as $index => $key) {
// php-jwt fails in JWK::parseKeySet the keyset contains one key with P-521 curve
// see https://github.com/firebase/php-jwt/blob/main/src/JWK.php#L31
if (isset($key['crv']) && $key['crv'] === 'P-521') {
unset($jwks['keys'][$index]);
}

// Only fix the key being referred to in the JWT.
if ($jwtHeader['kid'] != $key['kid']) {
continue;
Expand Down