Internalize Nimbus JwtDecoder Builder
Issue: gh-6010
This commit is contained in:
+2
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2019 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.
|
||||
@@ -25,7 +25,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;
|
||||
|
||||
/**
|
||||
@@ -50,7 +49,7 @@ public class OAuth2ResourceServerSecurityConfiguration extends WebSecurityConfig
|
||||
|
||||
@Bean
|
||||
JwtDecoder jwtDecoder() throws Exception {
|
||||
return new NimbusJwtDecoder(JwtProcessors.withPublicKey(key()).build());
|
||||
return NimbusJwtDecoder.withPublicKey(key()).build();
|
||||
}
|
||||
|
||||
private RSAPublicKey key() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user