public class SecurityContextImpl extends Object implements SecurityContext
SecurityContext
.
Used by default by SecurityContextHolder
strategies.
Constructor and Description |
---|
SecurityContextImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Authentication |
getAuthentication()
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.
|
String |
toString() |
public Authentication getAuthentication()
SecurityContext
getAuthentication
in interface SecurityContext
Authentication
or null
if no authentication
information is availablepublic void setAuthentication(Authentication authentication)
SecurityContext
setAuthentication
in interface SecurityContext
authentication
- the new Authentication
token, or
null
if no further authentication information should be stored