Class Authenticator.Context
java.lang.Object
org.elasticsearch.xpack.security.authc.Authenticator.Context
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing interface:
- Authenticator
This class is a container to encapsulate the current request and other necessary information (mostly configuration related)
required for authentication.
It is instantiated for every incoming request and passed around to
AuthenticatorChain and subsequently all
Authenticator.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAuthenticationToken(org.elasticsearch.xpack.core.security.authc.AuthenticationToken authenticationToken) voidaddUnsuccessfulMessage(String message) voidclose()org.elasticsearch.common.settings.SecureStringList<org.elasticsearch.xpack.core.security.authc.Realm>org.elasticsearch.xpack.core.security.user.Userorg.elasticsearch.xpack.core.security.authc.AuthenticationTokenorg.elasticsearch.xpack.security.authc.AuthenticationService.AuditableRequestorg.elasticsearch.common.util.concurrent.ThreadContextList<org.elasticsearch.xpack.core.security.authc.Realm>booleanvoidsetHandleNullToken(boolean value) boolean
-
Constructor Details
-
Context
public Context(org.elasticsearch.common.util.concurrent.ThreadContext threadContext, org.elasticsearch.xpack.security.authc.AuthenticationService.AuditableRequest request, org.elasticsearch.xpack.core.security.user.User fallbackUser, boolean allowAnonymous, Realms realms)
-
-
Method Details
-
getThreadContext
public org.elasticsearch.common.util.concurrent.ThreadContext getThreadContext() -
getRequest
public org.elasticsearch.xpack.security.authc.AuthenticationService.AuditableRequest getRequest() -
getFallbackUser
public org.elasticsearch.xpack.core.security.user.User getFallbackUser() -
isAllowAnonymous
public boolean isAllowAnonymous() -
setHandleNullToken
public void setHandleNullToken(boolean value) -
shouldHandleNullToken
public boolean shouldHandleNullToken() -
getUnsuccessfulMessages
-
addAuthenticationToken
public void addAuthenticationToken(org.elasticsearch.xpack.core.security.authc.AuthenticationToken authenticationToken) -
getMostRecentAuthenticationToken
@Nullable public org.elasticsearch.xpack.core.security.authc.AuthenticationToken getMostRecentAuthenticationToken() -
getBearerString
public org.elasticsearch.common.settings.SecureString getBearerString() -
getDefaultOrderedRealmList
-
getUnlicensedRealms
-
addUnsuccessfulMessage
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-