1
0
mirror of synced 2026-05-22 21:33:16 +00:00

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
@@ -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;
}