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.
  • Constructor Details

  • Method Details

    • getUser

      public User 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

      public AuthenticateResponse.RealmInfo getAuthenticationRealm()
      Returns:
      the realm that authenticated the user
    • getLookupRealm

      public AuthenticateResponse.RealmInfo getLookupRealm()
      Returns:
      the realm where the user information was looked up
    • getAuthenticationType

      public String getAuthenticationType()
    • getToken

      public Map<String,Object> getToken()
    • toXContent

      public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.xcontent.ToXContent
      Throws:
      IOException
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • fromXContent

      public static AuthenticateResponse fromXContent(org.elasticsearch.xcontent.XContentParser parser) throws IOException
      Throws:
      IOException