parent
84c45adc70
commit
3a53422478
|
@ -85,17 +85,14 @@ final class OidcBackChannelLogoutReactiveAuthenticationManager implements Reacti
|
||||||
|
|
||||||
private Mono<Jwt> decode(ClientRegistration registration, String token) {
|
private Mono<Jwt> decode(ClientRegistration registration, String token) {
|
||||||
ReactiveJwtDecoder logoutTokenDecoder = this.logoutTokenDecoderFactory.createDecoder(registration);
|
ReactiveJwtDecoder logoutTokenDecoder = this.logoutTokenDecoderFactory.createDecoder(registration);
|
||||||
try {
|
return logoutTokenDecoder.decode(token).onErrorResume(Exception.class, (ex) -> {
|
||||||
return logoutTokenDecoder.decode(token);
|
if (ex instanceof BadJwtException) {
|
||||||
}
|
OAuth2Error error = new OAuth2Error(OAuth2ErrorCodes.INVALID_REQUEST, ex.getMessage(),
|
||||||
catch (BadJwtException failed) {
|
"https://openid.net/specs/openid-connect-backchannel-1_0.html#Validation");
|
||||||
OAuth2Error error = new OAuth2Error(OAuth2ErrorCodes.INVALID_REQUEST, failed.getMessage(),
|
return Mono.error(new OAuth2AuthenticationException(error, ex));
|
||||||
"https://openid.net/specs/openid-connect-backchannel-1_0.html#Validation");
|
}
|
||||||
return Mono.error(new OAuth2AuthenticationException(error, failed));
|
return Mono.error(new AuthenticationServiceException(ex.getMessage(), ex));
|
||||||
}
|
});
|
||||||
catch (Exception failed) {
|
|
||||||
return Mono.error(new AuthenticationServiceException(failed.getMessage(), failed));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue