Skip to content

Commit 06fb2d6

Browse files
authored
Merge pull request #163 from spackmat/patch-1
Hotfix for regression with JWT v6
2 parents 49b58be + 8e8e862 commit 06fb2d6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Provider/Azure.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Firebase\JWT\JWT;
66
use Firebase\JWT\JWK;
7+
use Firebase\JWT\Key;
78
use League\OAuth2\Client\Grant\AbstractGrant;
89
use League\OAuth2\Client\Provider\AbstractProvider;
910
use League\OAuth2\Client\Provider\Exception\IdentityProviderException;
@@ -372,7 +373,7 @@ public function getJwtVerificationKeys()
372373

373374
$publicKey = $pkey_array ['key'];
374375

375-
$keys[$keyinfo['kid']] = $publicKey;
376+
$keys[$keyinfo['kid']] = new Key($publicKey, 'RS256');
376377
}
377378
} else if (isset($keyinfo['n']) && isset($keyinfo['e'])) {
378379
$pkey_object = JWK::parseKey($keyinfo);
@@ -389,7 +390,7 @@ public function getJwtVerificationKeys()
389390

390391
$publicKey = $pkey_array ['key'];
391392

392-
$keys[$keyinfo['kid']] = $publicKey;
393+
$keys[$keyinfo['kid']] = new Key($publicKey, 'RS256');;
393394
}
394395
}
395396

0 commit comments

Comments
 (0)