Class AuthenticateResponse
java.lang.Object
org.elasticsearch.client.security.AuthenticateResponse
- All Implemented Interfaces:
org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject
public final class AuthenticateResponse
extends Object
implements org.elasticsearch.xcontent.ToXContentObject
The response for the authenticate call. The response contains two fields: a
user field and a boolean flag signaling if the user is enabled or not. The
user object contains all user metadata which Elasticsearch uses to map roles,
etc.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params -
Field Summary
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionAuthenticateResponse(User user, boolean enabled, AuthenticateResponse.RealmInfo authenticationRealm, AuthenticateResponse.RealmInfo lookupRealm, String authenticationType) AuthenticateResponse(User user, boolean enabled, AuthenticateResponse.RealmInfo authenticationRealm, AuthenticateResponse.RealmInfo lookupRealm, String authenticationType, Map<String, Object> token) -
Method Summary
Modifier and TypeMethodDescriptionbooleanenabled()booleanstatic AuthenticateResponsefromXContent(org.elasticsearch.xcontent.XContentParser parser) getToken()getUser()inthashCode()org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
AuthenticateResponse
public AuthenticateResponse(User user, boolean enabled, AuthenticateResponse.RealmInfo authenticationRealm, AuthenticateResponse.RealmInfo lookupRealm, String authenticationType) -
AuthenticateResponse
public AuthenticateResponse(User user, boolean enabled, AuthenticateResponse.RealmInfo authenticationRealm, AuthenticateResponse.RealmInfo lookupRealm, String authenticationType, @Nullable Map<String, Object> token)
-
-
Method Details
-
getUser
- Returns:
- The effective user. This is the authenticated user, or, when submitting requests on behalf of other users, it is the impersonated user.
-
enabled
public boolean enabled()- Returns:
- whether the user is enabled or not
-
getAuthenticationRealm
- Returns:
- the realm that authenticated the user
-
getLookupRealm
- Returns:
- the realm where the user information was looked up
-
getAuthenticationType
-
getToken
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
fromXContent
public static AuthenticateResponse fromXContent(org.elasticsearch.xcontent.XContentParser parser) throws IOException - Throws:
IOException
-