Module org.elasticsearch.xcore
Class UserRoleMapper.UserData
java.lang.Object
org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper.UserData
- Enclosing interface:
UserRoleMapper
A representation of a user for whom roles should be mapped.
The user has been authenticated, but does not yet have any roles.
-
Constructor Summary
ConstructorsConstructorDescriptionUserData(String username, String dn, Collection<String> groups, Map<String, Object> metadata, RealmConfig realm) -
Method Summary
Modifier and TypeMethodDescriptionasModel()Formats the user data as aExpressionModel.getDn()The distinguished name of the authenticated user, if applicable to the authentication method used.The groups to which the user belongs in the originating user store.Any additional metadata that was provided at authentication time.getRealm()The realm that authenticated the user.The username for the authenticated user.toString()
-
Constructor Details
-
UserData
public UserData(String username, @Nullable String dn, Collection<String> groups, Map<String, Object> metadata, RealmConfig realm)
-
-
Method Details
-
asModel
Formats the user data as aExpressionModel. The model does not have nested values - all values are simple Java values, but keys may contain.. For example, themetadatavalues will be stored in the model with a key of"metadata.KEY"whereKEYis the key from the metadata object. -
toString
-
getUsername
The username for the authenticated user. -
getDn
The distinguished name of the authenticated user, if applicable to the authentication method used. Otherwise,null. -
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
Any additional metadata that was provided at authentication time. The set of keys will vary according to the authenticating realm. -
getRealm
The realm that authenticated the user.
-