1. Form Login
- DefaultLoginPageGeneratingFilter
- 기본 로그인 페이지 및 폼 제공
- Get방식의 /login 처리
- OAuth2 / OpenID / Saml2 로그인 같이 사용 가능
- UsernamePasswordAuthenticationFilter
- Post방식의 /login 처리
- http.processingUrl()을 통해 주소를 변경 가능
-
- filterProcessingUrl() : 로그인을 처리 Url
- dafaultSuccessUrl() : alwaysUse=false 옵션 설정하여 로그인이 성공했음에도 불구하고 다른 페이지를 사용시 적용되지 않도록 하기위한 옵션
- successHandler() : 성공시 핸들러 동작
- failureUrl() : 실패시 Url
- failureHandler() : 실패시 핸들러 동작
- authenticationDetailSource() : Authentication 객체의 details에 들어갈 정보를 직접 만듬설정 메소드
* 로그인 시 request와 AuthenticationToken을 detail 정보를 set하여 AuthenticationManager에게 인증을 위임하여 인증 체크
2. Logout Filter
- DefaultLogoutPageGeneratingFilter
- Get방식 /logout 처리
- Post방식의 /logout 처리 가능하도록 UI wprhd
- LogoutFilter
- Post방식의 /logout 처리
- session, SecurityContext, csrf, 쿠키 등을 삭제 처리
- 기본 페이지로 redirect
'Spring > 1-5. Spring Security' 카테고리의 다른 글
6) DaoAuthenticationManager와 UserDetailsService 사 (0) | 2023.06.11 |
---|---|
5) BasicAuthenticationFilter를 사용하여 토큰 인증 (0) | 2023.06.08 |
3. Spring Security Authentication 구조와 매커니즘 (0) | 2023.06.04 |
2. Spring Security의 Filter (0) | 2023.06.04 |
1. Spring Security 개념 (0) | 2023.06.04 |