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