What is SecurityContextHolder in spring?
The SecurityContext and SecurityContextHolder are two fundamental classes of Spring Security. The SecurityContext is used to store the details of the currently authenticated user, also known as a principle. ... The SecurityContextHolder is a helper class, which provide access to the security context.