mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-05-30 16:52:13 +00:00
#10505 Fix jwtDecoder
Fixed jwtDecoder(JWTProcessor jwtProcessor, OAuth2TokenValidator<Jwt> jwtValidator)
This commit is contained in:
parent
498636e26b
commit
5913501e1a
@ -416,9 +416,9 @@ Now that we have a tenant-aware processor and a tenant-aware validator, we can p
|
|||||||
----
|
----
|
||||||
@Bean
|
@Bean
|
||||||
JwtDecoder jwtDecoder(JWTProcessor jwtProcessor, OAuth2TokenValidator<Jwt> jwtValidator) {
|
JwtDecoder jwtDecoder(JWTProcessor jwtProcessor, OAuth2TokenValidator<Jwt> jwtValidator) {
|
||||||
NimbusJwtDecoder decoder = new NimbusJwtDecoder(processor);
|
NimbusJwtDecoder decoder = new NimbusJwtDecoder(jwtProcessor);
|
||||||
OAuth2TokenValidator<Jwt> validator = new DelegatingOAuth2TokenValidator<>
|
OAuth2TokenValidator<Jwt> validator = new DelegatingOAuth2TokenValidator<>
|
||||||
(JwtValidators.createDefault(), this.jwtValidator);
|
(JwtValidators.createDefault(), jwtValidator);
|
||||||
decoder.setJwtValidator(validator);
|
decoder.setJwtValidator(validator);
|
||||||
return decoder;
|
return decoder;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user