From 047bd16b5156de0bb595ff6b324a63cef92b1fe1 Mon Sep 17 00:00:00 2001 From: Josh Cummings Date: Wed, 8 May 2019 17:25:02 -0600 Subject: [PATCH] Propagate Exception in NimbusReactiveJwtDecoder Fixes: gh-6823 --- .../authentication/JwtReactiveAuthenticationManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oauth2/oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/authentication/JwtReactiveAuthenticationManager.java b/oauth2/oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/authentication/JwtReactiveAuthenticationManager.java index faefc683b4..b246fb939b 100644 --- a/oauth2/oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/authentication/JwtReactiveAuthenticationManager.java +++ b/oauth2/oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/authentication/JwtReactiveAuthenticationManager.java @@ -76,7 +76,7 @@ public final class JwtReactiveAuthenticationManager implements ReactiveAuthentic private OAuth2AuthenticationException onError(JwtException e) { OAuth2Error invalidRequest = invalidToken(e.getMessage()); - return new OAuth2AuthenticationException(invalidRequest, e.getMessage()); + return new OAuth2AuthenticationException(invalidRequest, invalidRequest.getDescription(), e); } private static OAuth2Error invalidToken(String message) {