Spring Security - SecurityContext, SecurityContextHolder
SecurityContext Authentication 객체를 저장한다. TheadLocal에 저장되어 아무 곳에서나 참조 가능하다(Thread Safe) 예) Authentication authentication = SecurityContextHolder.getContext().getAuthentication() 인증이 완료된 후에는 HttpSession에 저장된다. SecurityContextHolder SecurityContext를 관리한다. SecurityContext 저장 방식을 3가지로 나눠 관리한다. MODE_THREADLOCAL : 스레드당 SecurityContext 객체를 할당, 기본값 MODE_INHERITABLETHREADLOCAL : 메인 스레드와 자식 스레드에 관하여 동일한 Se..
2021.04.17