2022-06-19 16:24:07 +09:00
2022-06-19 16:23:29 +09:00
2022-05-18 00:02:49 +09:00
2022-06-17 02:39:49 +09:00
2022-05-18 00:02:49 +09:00
2022-05-18 00:02:49 +09:00
2022-06-19 16:24:07 +09:00

Spring Boot && JWT Demo

Spring Boot를 이용한 간단한 JWT 예시 레포지토리

How to use authenticationManager Bean in 5.7.1

참고 : https://spring.io/blog/2022/02/21/spring-security-without-the-websecurityconfigureradapter

Question

Is there any example how can I expose the AuthenticationManager bean? Previously I could do this by extending WebSecurityConfigurerAdapter and then creating the following method in my security config:

@Override
@Bean
public AuthenticationManager authenticationManagerBean() throws Exception {
    return super.authenticationManagerBean();
}

Answer

The following solution solved the issue for me.

@Bean
public AuthenticationManager authenticationManager(AuthenticationConfiguration authenticationConfiguration) throws Exception {
    return authenticationConfiguration.getAuthenticationManager();
}

TODO

Done ✓

  • Post on Blog
  • Implement regenerate refresh token test code
Description
Languages
Java 100%