티스토리 뷰
Spring Security - UsernamePasswordAuthenticationFilter
- Spring Security 에서 Form Login 인증을 처리하는 필터이다.
- 이전에 Spring Security 아키텍쳐를 살펴볼때 디버깅을 통해 살펴보았던 Filter이다.
UsernamePasswordAuthenticationFilter
- username, pasword로 Authentication객체를 생성하고, AuthenticaionManager를 사용하여 인증을 시도한다.
- 여러개의 AuthenticationProvider를 사용하여 인증을하는데 그중에서도 DaoAuthenticationProvider를 사용한다.
- DaoAuthenticationProvider는 UserDetailsService를 사용하여 인증을 시도하는데, 이 객체가 바로 우리가 구현한 UserDetailsService이다.
- AuthenticationProvider는 Parent 를 가지고있으며 현재 Provider가 처리를 하지 못한다면, 부모에게로 가 요청을 처리하는 식의 계층구조로 되어있다.
'Spring' 카테고리의 다른 글
Spring Security - Login/LogoutPage 커스터마이징 (0) | 2019.09.30 |
---|---|
Spring Security - DefaultLogin/LogoutPageGeneratingFilter (0) | 2019.09.30 |
Spring Security - Logout Filter (0) | 2019.09.28 |
Spring Security - CSRF Token 활용 (0) | 2019.09.26 |
Spring Security - CSRF Filter (0) | 2019.09.25 |
댓글