Update to NimbusJwtDecoder Builder

Issue: gh-5351
This commit is contained in:
Josh Cummings 2019-03-29 15:08:46 -06:00
parent 7e8aadeb96
commit 92e1da3a32
No known key found for this signature in database
GPG Key ID: 49EF60DD7FF83443
1 changed files with 1 additions and 2 deletions

View File

@ -28,7 +28,6 @@ import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.oauth2.jwt.JwtDecoder;
import org.springframework.security.oauth2.jwt.JwtProcessors;
import org.springframework.security.oauth2.jwt.NimbusJwtDecoder;
import org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationProvider;
import org.springframework.security.oauth2.server.resource.authentication.OAuth2IntrospectionAuthenticationProvider;
@ -71,7 +70,7 @@ public class OAuth2ResourceServerSecurityConfiguration extends WebSecurityConfig
}
AuthenticationManager jwt() {
JwtDecoder jwtDecoder = new NimbusJwtDecoder(JwtProcessors.withJwkSetUri(this.jwkSetUri).build());
JwtDecoder jwtDecoder = NimbusJwtDecoder.withJwkSetUri(this.jwkSetUri).build();
return new JwtAuthenticationProvider(jwtDecoder)::authenticate;
}