We will develop a separate Spring Boot application and apply the necessary configurations to use it as an authorization server. This is our custom authorization server. Create a Spring Boot application with the name SpringCustomAuthorization and add the following component, which is basically an essential entry point to building a custom authorization server:
@Configuration@EnableAuthorizationServerpublic class CustomAuthorizationConfig extends AuthorizationServerConfigurerAdapter{ @Autowired @Qualifier("authenticationManager") private AuthenticationManager authenticationManager; @Autowired PasswordEncoder encoder; @Override public void configure(ClientDetailsServiceConfigurer clients) throws Exception ...