-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)type: enhancementA general enhancementA general enhancement
Milestone
Description
Summary
JwtIssuerReactiveAuthenticationManagerResolver
eagerly creates Exception
s which are not thrown always
see
Lines 122 to 125 in a90e579
.flatMap(issuer -> | |
this.issuerAuthenticationManagerResolver.resolve(issuer).switchIfEmpty( | |
Mono.error(new InvalidBearerTokenException("Invalid issuer " + issuer))) | |
); |
and
Lines 143 to 146 in a90e579
String issuer = JWTParser.parse(token.getToken()).getJWTClaimsSet().getIssuer(); | |
return Mono.justOrEmpty(issuer).switchIfEmpty( | |
Mono.error(new InvalidBearerTokenException("Missing issuer"))); | |
} catch (Exception e) { |
Actual Behavior
Exceptions are instantiated always
Expected Behavior
Exceptions should be instantiated lazily only when they are needed
Version
5.3.0.BUILD-SNAPSHOT
Metadata
Metadata
Assignees
Labels
in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)type: enhancementA general enhancementA general enhancement