Package org.keycloak.storage.federated
Interface UserRoleMappingsFederatedStorage
- All Known Subinterfaces:
UserFederatedStorageProvider
,UserFederatedStorageProvider.Streams
,UserRoleMappingsFederatedStorage.Streams
- All Known Implementing Classes:
JpaUserFederatedStorageProvider
public interface UserRoleMappingsFederatedStorage
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Deprecated.This interface is no longer necessary; collection-based methods were removed from the parent interface and therefore the parent interface can be used directly -
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteRoleMapping
(RealmModel realm, String userId, RoleModel role) getRoleMappingsStream
(RealmModel realm, String userId) Obtains the roles associated with the federated user identified byuserId
.getRoleMembersStream
(RealmModel realm, RoleModel role, Integer firstResult, Integer max) Obtains the federated users that are members of the givenrole
in the specifiedrealm
.void
grantRole
(RealmModel realm, String userId, RoleModel role)
-
Method Details
-
grantRole
-
getRoleMappingsStream
Obtains the roles associated with the federated user identified byuserId
.- Parameters:
realm
- a reference to the realm.userId
- the user identifier.- Returns:
- a non-null
Stream
of roles.
-
deleteRoleMapping
-
getRoleMembersStream
Stream<String> getRoleMembersStream(RealmModel realm, RoleModel role, Integer firstResult, Integer max) Obtains the federated users that are members of the givenrole
in the specifiedrealm
.- Parameters:
realm
- a reference to the realm.role
- a reference to the role whose federated members are being searched.firstResult
- first result to return. Ignored if negative ornull
.max
- maximum number of results to return. Ignored if negative ornull
.- Returns:
- a non-null
Stream
of federated user ids that are members of the role in the realm.
-