-
UsernamePasswordAuthenticationFilter스프링 2023. 1. 19. 23:53
UsernamePasswordAuthenticationFilter
UsernamePasswordAuthenticationFilter는 Form기반의 Authentication방식으로
인증을 진행할때 아이디, 패스워드 데이터를 파싱하여
인증 요청을 위임하는 filter이다.
유저가 로그인 창에서 로그인 시도를 할 때 보내는 요청에서
id와 pw를 가져와서 인증을 위한 토큰을 생성후 인증을 다른쪽에 위임하는 필터이다.
Spring Boot 기반의 HttpSecurity를 설정하는 코드에서 http.formLogin(); 을 사용하면 시큐리티에서는 기본적으로 UsernamePasswordAuthenticationFilter 을 사용하게 된다.
@Override protected void configure(HttpSecurity http) throws Exception { http.formLogin(); }
728x90'스프링' 카테고리의 다른 글
API 예외처리-1 (0) 2023.01.26 OAuth2.0과 JWT적용 - 3 (0) 2023.01.25 JWT 토큰 체크 (0) 2023.01.19 OAuth2.0과 JWT적용 - 2 (0) 2023.01.17 OAuth2.0과 JWT적용 - 1 (0) 2023.01.17