Skip to content

Commit 73461c0

Browse files
committed
Handle expired jwt token
1 parent 459694c commit 73461c0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Auth/Own3dIdGuard.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Own3d\Id\Auth;
44

55
use Exception;
6+
use Firebase\JWT\ExpiredException;
67
use Firebase\JWT\JWT;
78
use Firebase\JWT\Key;
89
use Firebase\JWT\SignatureInvalidException;
@@ -123,7 +124,7 @@ private function decodeAuthorizationToken(string $token): stdClass
123124
foreach (self::$extSecrets as $extSecret) {
124125
try {
125126
return JWT::decode($token, new Key($extSecret['n'], $extSecret['alg']));
126-
} catch (SignatureInvalidException $exception) {
127+
} catch (SignatureInvalidException|ExpiredException $exception) {
127128
// do nothing
128129
}
129130
}

0 commit comments

Comments
 (0)