Describe the bug The sample code for the JwtDecoder is does not compile: docs/modules/ROOT/pages/servlet/oauth2/resource-server/multitenancy.adoc#L418-L424
Details in comments:
JwtDecoder jwtDecoder(JWTProcessor jwtProcessor, OAuth2TokenValidator<Jwt> jwtValidator) {
//FIXME: Should be jwtProcessor not processor
NimbusJwtDecoder decoder = new NimbusJwtDecoder(processor);
//FIXME: The jwtValidator is a method argument not an instance variable.
OAuth2TokenValidator<Jwt> validator = new DelegatingOAuth2TokenValidator<>
(JwtValidators.createDefault(), this.jwtValidator);
decoder.setJwtValidator(validator);
return decoder;
}
To Reproduce Try to use the sample code.
Expected behavior Sample code should be valid
Comment From: jzheaux
Thanks, @jmax01! Can you provide a PR to update the documentation?
Comment From: jmax01
@jzheaux Sure!
Comment From: jzheaux
Fixed via https://github.com/spring-projects/spring-security/commit/3fb1565cc062938c78ed9890f9394be0a22e360a