반응형
ExceptionTranslationFilter
-
[스프링 시큐리티] ExceptionTranslationFilter강의노트/스프링 시큐리티 2020. 9. 12. 13:25
ExceptionTranslationFilter 필터의 경우 아래 2가지 예외를 발생시킨다. 인증 예외 (AuthenticationException) AuthenticationEntryPoint 호출 로그인 페이지 이동, 401 오류 코드 전달, SecurityContext 초기화 AuthenticationEntryPoint를 직접 구현해서 인증 예외 처리를 할 수도 있다. this.authenticationEntryPoint.commence(request, response, reason); 인증 예외가 발생하기 전의 요청 정보를 저장 RequestCache 인터페이스 : 사용자의 이전 요청 정보를 세션에 저장하고 이를 꺼내 오는 캐시 메커니즘 사용자가 다시 로그인하여 성공 후 이전 가고자 했던 리소스 ..