public class AuthenticationCredentialsLocalBinder
extends java.lang.Object
The thread local state carried by this class should be set by core CAS components processing core authentication and
CAS protocol events e.g. AuthenticationManager, CentralAuthenticationService, etc.
The clearing of this state at the end of a thread execution path is the responsibility
of AuthenticationCredentialsLocalBinderClearingFilter
| Modifier | Constructor and Description |
|---|---|
protected |
AuthenticationCredentialsLocalBinder() |
| Modifier and Type | Method and Description |
|---|---|
static void |
bindCurrent(org.apereo.cas.authentication.Authentication authentication)
Bind Authentication to ThreadLocal.
|
static void |
bindCurrent(org.apereo.cas.authentication.AuthenticationBuilder builder)
Bind AuthenticationBuilder to ThreadLocal.
|
static void |
bindCurrent(java.util.Collection<org.apereo.cas.authentication.Credential> credentials)
Bind credentials to ThreadLocal.
|
static void |
bindCurrent(org.apereo.cas.authentication.Credential... credentials)
Bind credentials to ThreadLocal.
|
static void |
clear()
Clear ThreadLocal state.
|
static org.apereo.cas.authentication.Authentication |
getCurrentAuthentication()
Get Authentication from ThreadLocal.
|
static org.apereo.cas.authentication.AuthenticationBuilder |
getCurrentAuthenticationBuilder()
Get AuthenticationBuilder from ThreadLocal.
|
static java.lang.String[] |
getCurrentCredentialIds()
Get credential ids from ThreadLocal.
|
static java.lang.String |
getCurrentCredentialIdsAsString()
Get credential ids String representation from ThreadLocal.
|
protected AuthenticationCredentialsLocalBinder()
public static void bindCurrent(java.util.Collection<org.apereo.cas.authentication.Credential> credentials)
credentials - the credentialspublic static void bindCurrent(org.apereo.cas.authentication.Credential... credentials)
credentials - the credentialspublic static void bindCurrent(org.apereo.cas.authentication.Authentication authentication)
authentication - the authenticationpublic static void bindCurrent(org.apereo.cas.authentication.AuthenticationBuilder builder)
builder - the authentication builderpublic static java.lang.String[] getCurrentCredentialIds()
public static java.lang.String getCurrentCredentialIdsAsString()
public static org.apereo.cas.authentication.AuthenticationBuilder getCurrentAuthenticationBuilder()
public static org.apereo.cas.authentication.Authentication getCurrentAuthentication()
public static void clear()