public class JwtRealm
extends org.elasticsearch.xpack.core.security.authc.Realm
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
TYPE |
| Modifier and Type | Method | Description |
|---|---|---|
void |
authenticate(org.elasticsearch.xpack.core.security.authc.AuthenticationToken authenticationToken,
org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.authc.AuthenticationResult> listener) |
Method that handles the actual authentication of the token.
|
void |
lookupUser(java.lang.String username,
org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.user.User> listener) |
This method looks for a user that is identified by the given String.
|
boolean |
supports(org.elasticsearch.xpack.core.security.authc.AuthenticationToken token) |
Indicates whether this realm supports the given token.
|
org.elasticsearch.xpack.core.security.authc.AuthenticationToken |
token(org.elasticsearch.common.util.concurrent.ThreadContext context) |
This method will extract a token from the given
RestRequest if possible. |
public static final java.lang.String TYPE
public boolean supports(org.elasticsearch.xpack.core.security.authc.AuthenticationToken token)
BearerToken objects
for authenticationsupports in class org.elasticsearch.xpack.core.security.authc.Realmtoken - the token to test for supportpublic org.elasticsearch.xpack.core.security.authc.AuthenticationToken token(org.elasticsearch.common.util.concurrent.ThreadContext context)
RestRequest if possible. This implementation of token
extraction looks for the specific header, the X-Authorization headertoken in class org.elasticsearch.xpack.core.security.authc.Realmcontext - the ThreadContext that contains headers and transient objects for a requestAuthenticationToken if possible to extract or nullpublic void authenticate(org.elasticsearch.xpack.core.security.authc.AuthenticationToken authenticationToken,
org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.authc.AuthenticationResult> listener)
access_token from the client is valid and on success,
a User will be returned as the argument to the listener's ActionListener.onResponse(Object)
method. Else null is returned.authenticate in class org.elasticsearch.xpack.core.security.authc.RealmauthenticationToken - the token to authenticatelistener - return authentication result by calling ActionListener.onResponse(Object)public void lookupUser(java.lang.String username,
org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.user.User> listener)
lookupUser in class org.elasticsearch.xpack.core.security.authc.Realmusername - the identifier for the userlistener - used to return lookup result