Skip to content

Commit a85917d

Browse files
committed
bugfix jwt
1 parent 35da0cc commit a85917d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Tqdev/PhpCrudApi/Middleware/JwtAuthMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ private function getVerifiedClaims(String $token, int $time, int $leeway, int $t
3434
if (!isset($algorithms[$algorithm])) {
3535
return array();
3636
}
37-
if (!in_array($algorithm, $requirements['alg'])) {
37+
if (!empty($requirements['alg']) && !in_array($algorithm, $requirements['alg'])) {
3838
return array();
3939
}
4040
$hmac = $algorithms[$algorithm];

0 commit comments

Comments
 (0)