AuthenticationException

    ExceptionTranslationFilter - 예외 전환 필터

    FilterSecurityInterceptor 바로 위에 위치하며, FilterSecurityInterceptor 실행 중 발생할 수 있는 예외(AccessDeniedException과 AuthenticationException을)를 잡고 처리한다 FilterSecurityInterceptor는 FilterChainProxy에서 필터 가장 마지막에 위치한다. 필터 체인에서 발생하는 AccessDeniedException과 AuthenticationException을 처리하는 필터 처리할 수 없는 예외는 rethrow 하여 그냥 앞으로 던져버린다. FilterSecurityInterceptor 가 AccessDecisionManager 를 통해 AuthenticationException 혹은, Access..

    인증 예외(AuthenticationException)를 처리하는 AuthenticationEntryPoint

    Spring Security 인증 예외를 처리하는 AuthenticationEntryPoint AuthenticationEntryPoint 는 인증되지 않은 사용자에 대한 처리를 담당한다. (핸들러 라고 볼 수 있다) 이 때 처리는, 그냥 http 응답이라던가, 페이지 redirect 라 던가 등 개발자가 정의할 수 있다. AuthenticationException (인증 예외)예외가 발생했을떄 처리하는 인터페이스이다. 헷갈리지 말아야 하는게, AccessDeniedException( 인가 예외) 가 발생했을 때 처리하는 인터페이스가 아니다. /** * Used by {@link ExceptionTranslationFilter} to commence an authentication scheme. */ p..