Class GroupLDAPStorageMapper.LDAPGroupMappingsUserDelegate
- java.lang.Object
-
- org.keycloak.models.utils.UserModelDelegate
-
- org.keycloak.storage.ldap.mappers.membership.group.GroupLDAPStorageMapper.LDAPGroupMappingsUserDelegate
-
- All Implemented Interfaces:
RoleMapperModel
,UserModel
- Enclosing class:
- GroupLDAPStorageMapper
public class GroupLDAPStorageMapper.LDAPGroupMappingsUserDelegate extends UserModelDelegate
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.keycloak.models.UserModel
UserModel.RequiredAction, UserModel.SearchableFields, UserModel.Streams, UserModel.UserRemovedEvent
-
-
Field Summary
-
Fields inherited from class org.keycloak.models.utils.UserModelDelegate
delegate
-
Fields inherited from interface org.keycloak.models.UserModel
COMPARE_BY_USERNAME, DISABLED_REASON, EMAIL, EMAIL_VERIFIED, ENABLED, EXACT, FIRST_NAME, GROUPS, IDP_ALIAS, IDP_USER_ID, INCLUDE_SERVICE_ACCOUNT, LAST_NAME, LOCALE, SEARCH, USERNAME
-
-
Constructor Summary
Constructors Constructor Description LDAPGroupMappingsUserDelegate(RealmModel realm, UserModel user, LDAPObject ldapUser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stream<GroupModel>
getGroupsStream()
Obtains the groups associated with the user.protected Stream<GroupModel>
getLDAPGroupMappingsConverted()
boolean
hasRole(RoleModel role)
Returnstrue
if this object is directly or indirectly assigned the given role,false
otherwise.boolean
isMemberOf(GroupModel group)
void
joinGroup(GroupModel group)
void
leaveGroup(GroupModel group)
-
Methods inherited from class org.keycloak.models.utils.UserModelDelegate
addRequiredAction, addRequiredAction, credentialManager, deleteRoleMapping, equals, getAttributes, getAttributeStream, getClientRoleMappingsStream, getCreatedTimestamp, getDelegate, getEmail, getFederationLink, getFirstAttribute, getFirstName, getId, getLastName, getRealmRoleMappingsStream, getRequiredActionsStream, getRoleMappingsStream, getServiceAccountClientLink, getUsername, grantRole, hashCode, isEmailVerified, isEnabled, removeAttribute, removeRequiredAction, removeRequiredAction, setAttribute, setCreatedTimestamp, setEmail, setEmailVerified, setEnabled, setFederationLink, setFirstName, setLastName, setServiceAccountClientLink, setSingleAttribute, setUsername
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.keycloak.models.RoleMapperModel
hasDirectRole
-
Methods inherited from interface org.keycloak.models.UserModel
getGroupsCount, getGroupsCountByNameContaining, getGroupsStream
-
-
-
-
Constructor Detail
-
LDAPGroupMappingsUserDelegate
public LDAPGroupMappingsUserDelegate(RealmModel realm, UserModel user, LDAPObject ldapUser)
-
-
Method Detail
-
hasRole
public boolean hasRole(RoleModel role)
Description copied from interface:RoleMapperModel
Returnstrue
if this object is directly or indirectly assigned the given role,false
otherwise.For example,
true
is returned for hasRole(R) if:- R is directly assigned to this object
- R is indirectly assigned to this object via composites
- R is not assigned to this object but this object belongs to a group G which is assigned the role R
- R is not assigned to this object but this object belongs to a group G, and G belongs to group H which is assigned the role R
- Specified by:
hasRole
in interfaceRoleMapperModel
- Overrides:
hasRole
in classUserModelDelegate
- Returns:
- see description
- See Also:
if you want to check if this object is directly assigned to a role
-
getGroupsStream
public Stream<GroupModel> getGroupsStream()
Description copied from interface:UserModel
Obtains the groups associated with the user.- Specified by:
getGroupsStream
in interfaceUserModel
- Overrides:
getGroupsStream
in classUserModelDelegate
- Returns:
- a non-null
Stream
of groups.
-
joinGroup
public void joinGroup(GroupModel group)
- Specified by:
joinGroup
in interfaceUserModel
- Overrides:
joinGroup
in classUserModelDelegate
-
leaveGroup
public void leaveGroup(GroupModel group)
- Specified by:
leaveGroup
in interfaceUserModel
- Overrides:
leaveGroup
in classUserModelDelegate
-
isMemberOf
public boolean isMemberOf(GroupModel group)
- Specified by:
isMemberOf
in interfaceUserModel
- Overrides:
isMemberOf
in classUserModelDelegate
-
getLDAPGroupMappingsConverted
protected Stream<GroupModel> getLDAPGroupMappingsConverted()
-
-