inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

suhackghost님의 게시글

suhackghost suhackghost

@suhackghost1971

수강평 작성수
-
평균평점
-

게시글 1

질문&답변

SecurityContextHolder.getContext().setAuthentication(authentication);

로그인할 때 setAuthentication 하는 이유가 먼가요? 어차피 세션이 stateless 인데, 로그인은 그냥 토큰만 주면 끝나는 거고, setAuthentication 할 필요가 없지 않나요? 로그인 뒤에 헤더에 토큰 달고 오는 요청은 doFilter 에서 setAuthentication 되니까요

좋아요수
1
댓글수
2
조회수
550