-
카테고리
-
세부 분야
백엔드
-
해결 여부
미해결
인증 거부 처리 강의 중 질문
23.08.08 15:05 작성 23.08.08 15:08 수정 조회수 210
0
인증 거부 처리 -8:42 ) LoginController 에서 Account account = (Account) authentication.getPrincipal();
이 가능 한 이유가 저희가 인증 객체를
CustomAuthenticationProvider코드에서 UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(accountContext.getAccount(), null, accountContext.getAuthorities());
로 토큰을 만들어서 스프링이 내부적으로 SecurityContext 안에
accountContext.getAccount(); (인증객체) 을 저장했기 때문에
가능하다고 이해했는데 맞나요 ?
답변을 작성해보세요.
1
답변 1