Spring Security 5 버전에서 6 버전으로 바뀌면서 변경된 내용중 SecurityContextHolder 에 관한 내용이 있어공부하게 되었다. SecurityContext사용자 인증 정보를 저장하고 있는 Authentication 객체를 저장하는 보관소이다.SecurityContextHolder 전략(Strategy)에 따라 SecurityContext 에 저장하는 방식이 다르며일반적으로 ThreadLocal 에 저장한다.Authentication 인증 객체를 한 쓰레드에서 공유하므로 언제든지 불러와 사용할 수 있다. SecurityContextHolderSecurityContext 를 관리하고 저장하는 객체이다.SecurityContext 저장을 위해 ThreadLocal 를 가지고 있다..
SecurityContext, SecurityContextHolder
Spring Security 5 버전에서 6 버전으로 바뀌면서 변경된 내용중 SecurityContextHolder 에 관한 내용이 있어공부하게 되었다. SecurityContext사용자 인증 정보를 저장하고 있는 Authentication 객체를 저장하는 보관소이다.SecurityContextHolder 전략(Strategy)에 따라 SecurityContext 에 저장하는 방식이 다르며일반적으로 ThreadLocal 에 저장한다.Authentication 인증 객체를 한 쓰레드에서 공유하므로 언제든지 불러와 사용할 수 있다. SecurityContextHolderSecurityContext 를 관리하고 저장하는 객체이다.SecurityContext 저장을 위해 ThreadLocal 를 가지고 있다..
2024.02.23