mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-05-31 01:02:14 +00:00
Fixes in decoder
This commit is contained in:
parent
a5f7713d9f
commit
7b406e89e4
@ -102,7 +102,7 @@ public final class NimbusJwkReactiveJwtDecoder implements ReactiveJwtDecoder {
|
||||
if (jwt instanceof SignedJWT) {
|
||||
return this.decode((SignedJWT) jwt);
|
||||
}
|
||||
return Mono.empty();
|
||||
throw new JwtException("Unsupported algorithm of " + jwt.getHeader().getAlgorithm());
|
||||
}
|
||||
|
||||
private JWT parse(String token) {
|
||||
@ -129,11 +129,8 @@ public final class NimbusJwkReactiveJwtDecoder implements ReactiveJwtDecoder {
|
||||
try {
|
||||
return this.jwtProcessor.process(parsedToken, new JWKContext(jwkList));
|
||||
}
|
||||
catch (BadJOSEException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
catch (JOSEException e) {
|
||||
throw new RuntimeException(e);
|
||||
catch (BadJOSEException | JOSEException e) {
|
||||
throw new JwtException("Failed to validate the token", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user