Skip to content

Commit 06febbd

Browse files
committed
Catch no jwk found to check signiture against
1 parent 9867b90 commit 06febbd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/OpenIDConnectClient.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,6 +1250,10 @@ public function verifyJWS(JWS $jws): bool
12501250
throw new OpenIDConnectClientException('No support for signature type: ' . $alg);
12511251
}
12521252

1253+
if ($jwk === null) {
1254+
throw new OpenIDConnectClientException('Unable to find JWK for algorithm: ' . $alg);
1255+
}
1256+
12531257
return $jwsVerifier->verifyWithKey($jws, $jwk, 0);
12541258
}
12551259

0 commit comments

Comments
 (0)