Class SecurityContextImpl
java.lang.Object
org.springframework.security.core.context.SecurityContextImpl
- All Implemented Interfaces:
Serializable
,SecurityContext
- Direct Known Subclasses:
TransientSecurityContext
Base implementation of
SecurityContext
.
Used by default by SecurityContextHolder
strategies.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Obtains the currently authenticated principal, or an authentication request token.int
hashCode()
void
setAuthentication
(Authentication authentication) Changes the currently authenticated principal, or removes the authentication information.toString()
-
Constructor Details
-
SecurityContextImpl
public SecurityContextImpl() -
SecurityContextImpl
-
-
Method Details
-
equals
-
getAuthentication
Description copied from interface:SecurityContext
Obtains the currently authenticated principal, or an authentication request token.- Specified by:
getAuthentication
in interfaceSecurityContext
- Returns:
- the
Authentication
ornull
if no authentication information is available
-
hashCode
public int hashCode() -
setAuthentication
Description copied from interface:SecurityContext
Changes the currently authenticated principal, or removes the authentication information.- Specified by:
setAuthentication
in interfaceSecurityContext
- Parameters:
authentication
- the newAuthentication
token, ornull
if no further authentication information should be stored
-
toString
-