Class UserRoleMapper.UserData

java.lang.Object
org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper.UserData
Enclosing interface:
UserRoleMapper

public static class UserRoleMapper.UserData extends Object
A representation of a user for whom roles should be mapped. The user has been authenticated, but does not yet have any roles.
  • Constructor Details

  • Method Details

    • asModel

      public ExpressionModel asModel()
      Formats the user data as a ExpressionModel. The model does not have nested values - all values are simple Java values, but keys may contain .. For example, the metadata values will be stored in the model with a key of "metadata.KEY" where KEY is the key from the metadata object.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getUsername

      public String getUsername()
      The username for the authenticated user.
    • getDn

      @Nullable public String getDn()
      The distinguished name of the authenticated user, if applicable to the authentication method used. Otherwise, null.
    • getGroups

      public Set<String> getGroups()
      The groups to which the user belongs in the originating user store. Should be empty if the user store or authentication method does not support groups.
    • getMetadata

      public Map<String,Object> getMetadata()
      Any additional metadata that was provided at authentication time. The set of keys will vary according to the authenticating realm.
    • getRealm

      public RealmConfig getRealm()
      The realm that authenticated the user.