인증/인가 과정(jwt)

김성수·2023년 6월 20일
0

들어가면서

오늘 배운 Spring security + JWT 방식의 인증/인가 과정을 아주 간략하게 정리해본다.

인증/인과 과정

AttemptAuthentication ->
successfulAuthentication ->
(로그인 성공 시) AuthorizationFilter.java(인가)의 doFilterInternal 메서드 실행 ->
setAuthentication() 메서드 호출, SecurityContextHolder에 Authentication 정보가 담김 -> HomeController.java home 라우터 실행, SecurityContextHolder에 저장되어있던 user 정보 사용)

profile
깊이 있는 소프트웨어 개발자가 되고 싶습니다.

0개의 댓글