반응형
Authentication
-
[스프링 시큐리티] 인증 정보 저장 객체(Authentication)강의노트/스프링 시큐리티 2020. 9. 14. 18:14
인증 클라이언트가 자신이 주장하는 사용자와 같은 사용자인지를 확인하는 과정이다. 인증 시 id와 password를 담고 인증 검증을 위해 전달되어 사용된다. 인증 후 최종 인증 결과를 Authentication객체(User객체, 권한 정보)에 담고 SecurityContext에 저장되어 전역적으로 참조가 가능해진다. Authentication authentication = SecurityContextHolder.getContext().getAuthentication() 구조 principal : 사용자 아이디 또는 User 객체 credentials : 사용자 비밀번호 authorities : 인증된 사용자의 권한 목록 details : 사용자의 인증 정보 외에 부가 정보 Authenticated : 인..