Class UserAndMetadata
- java.lang.Object
-
- com.couchbase.client.java.manager.user.UserAndMetadata
-
-
Constructor Summary
Constructors Constructor Description UserAndMetadata(AuthDomain domain, String username, String displayName, Collection<RoleAndOrigins> effectiveRoles, Collection<String> groups, Collection<String> externalGroups, String passwordChanged)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthDomain
domain()
Set<Role>
effectiveRoles()
Returns all of the user's roles, including roles inherited from groups.List<RoleAndOrigins>
effectiveRolesAndOrigins()
Returns all of the user's roles plus information about whether each role is assigned specifically to the user or inherited from a group, and if so which group.Set<String>
externalGroups()
Set<Role>
innateRoles()
Returns the roles assigned specifically to the user.Optional<Instant>
passwordChanged()
Returns the time the user's password was last set, if known.String
toString()
User
user()
Returns a new mutableUser
with initial values matching the data in thisUserAndMetadata
.
-
-
-
Constructor Detail
-
UserAndMetadata
public UserAndMetadata(AuthDomain domain, String username, String displayName, Collection<RoleAndOrigins> effectiveRoles, Collection<String> groups, Collection<String> externalGroups, String passwordChanged)
-
-
Method Detail
-
domain
public AuthDomain domain()
-
user
public User user()
Returns a new mutableUser
with initial values matching the data in thisUserAndMetadata
.
-
innateRoles
public Set<Role> innateRoles()
Returns the roles assigned specifically to the user. Excludes roles that are only inherited from groups.
-
effectiveRoles
public Set<Role> effectiveRoles()
Returns all of the user's roles, including roles inherited from groups.
-
effectiveRolesAndOrigins
public List<RoleAndOrigins> effectiveRolesAndOrigins()
Returns all of the user's roles plus information about whether each role is assigned specifically to the user or inherited from a group, and if so which group.
-
passwordChanged
public Optional<Instant> passwordChanged()
Returns the time the user's password was last set, if known.
-
-