0

I'm currently working on implementing an Authorization Server using Spring Security OAuth. While configuring the OAuth server, I've encountered that the AuthorizationServerConfigurerAdapter class itself has been deprecated.

Here's a segment of the code where I extend AuthorizationServerConfigurerAdapter:

@Configuration @EnableAuthorizationServer protected static class OAuthConfig extends AuthorizationServerConfigurerAdapter{ @Autowired private AuthenticationManager authenticationManager; @Autowired private WebAdminCredentials webadminCredentials; @Override public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception { endpoints.authenticationManager(authenticationManager).allowedTokenEndpointRequestMethods(HttpMethod.GET, HttpMethod.POST); } @Override public void configure(AuthorizationServerSecurityConfigurer security) throws Exception { super.configure(security); } @Override public void configure(ClientDetailsServiceConfigurer clients) throws Exception { // Configure clients } } 

Considering the deprecation of AuthorizationServerConfigurerAdapter, I have a couple of questions:

What alternatives are available for AuthorizationServerConfigurerAdapter? How can I migrate my current implementation to accommodate the deprecation?

I couldn't find any suitable replacement code for this anywhere.

4
  • spring-security-oauth2 is end of life since 2022, last version was 2.5.x. There is a new Spring Authoritation sever project, which you can use. Commented Apr 22, 2024 at 7:45
  • spring.io/projects/spring-authorization-server Commented Apr 22, 2024 at 7:47
  • Thank you for letting me know. Is there any alternative approach for Spring Boot 2.7 version? Would it be better to upgrade to 3.0 instead? Commented Apr 23, 2024 at 0:51
  • Sure, it is better to update to Spring Boot 3.x, because Spring Boot 2.7 is out maintance since last september. Commented May 3, 2024 at 15:37

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.