public class

SecurityContextImpl

extends Object
implements SecurityContext
java.lang.Object
   ↳ org.springframework.security.core.context.SecurityContextImpl

Class Overview

Base implementation of SecurityContext.

Used by default by SecurityContextHolder strategies.

Summary

Public Constructors
SecurityContextImpl()
Public Methods
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()
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.security.core.context.SecurityContext

Public Constructors

public SecurityContextImpl ()

Public Methods

public boolean equals (Object obj)

public Authentication getAuthentication ()

Obtains the currently authenticated principal, or an authentication request token.

Returns
  • the Authentication or null if no authentication information is available

public int hashCode ()

public void setAuthentication (Authentication authentication)

Changes the currently authenticated principal, or removes the authentication information.

Parameters
authentication the new Authentication token, or null if no further authentication information should be stored

public String toString ()