NimbusReactiveJwtDecoder support mono chain

Supports reactive exception handling when using PublicKeyReactiveJwtDecoderBuilder and SecretKeyReactiveJwtDecoderBuilder
This commit is contained in:
Geon Park 2023-01-11 13:27:02 +09:00 committed by Josh Cummings
parent 53a273ed54
commit 613b16c247

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2021 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -488,7 +488,7 @@ public final class NimbusReactiveJwtDecoder implements ReactiveJwtDecoder {
jwtProcessor.setJWTClaimsSetVerifier((claims, context) -> {
});
this.jwtProcessorCustomizer.accept(jwtProcessor);
return (jwt) -> Mono.just(createClaimsSet(jwtProcessor, jwt, null));
return (jwt) -> Mono.fromCallable(() -> createClaimsSet(jwtProcessor, jwt, null));
}
}
@ -563,7 +563,7 @@ public final class NimbusReactiveJwtDecoder implements ReactiveJwtDecoder {
jwtProcessor.setJWTClaimsSetVerifier((claims, context) -> {
});
this.jwtProcessorCustomizer.accept(jwtProcessor);
return (jwt) -> Mono.just(createClaimsSet(jwtProcessor, jwt, null));
return (jwt) -> Mono.fromCallable(() -> createClaimsSet(jwtProcessor, jwt, null));
}
}