public class JpaUserFederatedStorageProvider extends Object implements UserFederatedStorageProvider.Streams, UserCredentialStore.Streams
UserFederatedStorageProvider.StreamsUserCredentialStore.Streams| Modifier and Type | Field and Description |
|---|---|
protected javax.persistence.EntityManager |
em |
protected static org.jboss.logging.Logger |
logger |
| Constructor and Description |
|---|
JpaUserFederatedStorageProvider(KeycloakSession session,
javax.persistence.EntityManager em) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetStoredUsersgetUsersByUserAttributegetFederatedIdentitiesgetConsentsgetStoredCredentials, getStoredCredentialsByTypegetGroups, getMembershipgetRequiredActionsgetRoleMappingsgetStoredCredentials, getStoredCredentialsByTypeprotected static final org.jboss.logging.Logger logger
protected javax.persistence.EntityManager em
public JpaUserFederatedStorageProvider(KeycloakSession session, javax.persistence.EntityManager em)
protected void createIndex(RealmModel realm, String userId)
public void setAttribute(RealmModel realm, String userId, String name, List<String> values)
setAttribute in interface UserAttributeFederatedStoragepublic void setSingleAttribute(RealmModel realm, String userId, String name, String value)
setSingleAttribute in interface UserAttributeFederatedStoragepublic void removeAttribute(RealmModel realm, String userId, String name)
removeAttribute in interface UserAttributeFederatedStoragepublic MultivaluedHashMap<String,String> getAttributes(RealmModel realm, String userId)
getAttributes in interface UserAttributeFederatedStoragepublic Stream<String> getUsersByUserAttributeStream(RealmModel realm, String name, String value)
UserAttributeFederatedStoragename and value.getUsersByUserAttributeStream in interface UserAttributeFederatedStoragegetUsersByUserAttributeStream in interface UserAttributeFederatedStorage.Streamsrealm - a reference to the realm.name - the attribute name.value - the attribute value.Stream of users that match the search criteria.public String getUserByFederatedIdentity(FederatedIdentityModel link, RealmModel realm)
getUserByFederatedIdentity in interface UserBrokerLinkFederatedStoragepublic void addFederatedIdentity(RealmModel realm, String userId, FederatedIdentityModel link)
addFederatedIdentity in interface UserBrokerLinkFederatedStoragepublic boolean removeFederatedIdentity(RealmModel realm, String userId, String socialProvider)
removeFederatedIdentity in interface UserBrokerLinkFederatedStoragepublic void preRemove(RealmModel realm, IdentityProviderModel provider)
preRemove in interface UserBrokerLinkFederatedStoragepublic void updateFederatedIdentity(RealmModel realm, String userId, FederatedIdentityModel model)
updateFederatedIdentity in interface UserBrokerLinkFederatedStoragepublic Stream<FederatedIdentityModel> getFederatedIdentitiesStream(String userId, RealmModel realm)
UserBrokerLinkFederatedStorageuserId.getFederatedIdentitiesStream in interface UserBrokerLinkFederatedStoragegetFederatedIdentitiesStream in interface UserBrokerLinkFederatedStorage.StreamsuserId - the user identifier.realm - a reference to the realm.Stream of federated identities associated with the user.public FederatedIdentityModel getFederatedIdentity(String userId, String socialProvider, RealmModel realm)
getFederatedIdentity in interface UserBrokerLinkFederatedStoragepublic void addConsent(RealmModel realm, String userId, UserConsentModel consent)
addConsent in interface UserConsentFederatedStoragepublic UserConsentModel getConsentByClient(RealmModel realm, String userId, String clientInternalId)
getConsentByClient in interface UserConsentFederatedStoragepublic Stream<UserConsentModel> getConsentsStream(RealmModel realm, String userId)
UserConsentFederatedStorageuserId.getConsentsStream in interface UserConsentFederatedStoragegetConsentsStream in interface UserConsentFederatedStorage.Streamsrealm - a reference to the realm.userId - the user identifier.Stream of consents associated with the user.public void updateConsent(RealmModel realm, String userId, UserConsentModel consent)
updateConsent in interface UserConsentFederatedStoragepublic boolean revokeConsentForClient(RealmModel realm, String userId, String clientInternalId)
revokeConsentForClient in interface UserConsentFederatedStoragepublic void setNotBeforeForUser(RealmModel realm, String userId, int notBefore)
setNotBeforeForUser in interface UserNotBeforeFederatedStoragepublic int getNotBeforeOfUser(RealmModel realm, String userId)
getNotBeforeOfUser in interface UserNotBeforeFederatedStoragepublic Stream<GroupModel> getGroupsStream(RealmModel realm, String userId)
UserGroupMembershipFederatedStoragegetGroupsStream in interface UserGroupMembershipFederatedStoragegetGroupsStream in interface UserGroupMembershipFederatedStorage.Streamsrealm - a reference to the realm.userId - the user identifier.Stream of groups.public void joinGroup(RealmModel realm, String userId, GroupModel group)
joinGroup in interface UserGroupMembershipFederatedStoragepublic void leaveGroup(RealmModel realm, String userId, GroupModel group)
leaveGroup in interface UserGroupMembershipFederatedStoragepublic Stream<String> getMembershipStream(RealmModel realm, GroupModel group, Integer firstResult, Integer max)
UserGroupMembershipFederatedStoragegroup in the specified realm.getMembershipStream in interface UserGroupMembershipFederatedStoragegetMembershipStream in interface UserGroupMembershipFederatedStorage.Streamsrealm - a reference to the realm.group - a reference to the group whose federated members are being searched.firstResult - first result to return. Ignored if negative or null.max - maximum number of results to return. Ignored if negative or null.Stream of federated user ids that are members of the group in the realm.public Stream<String> getRequiredActionsStream(RealmModel realm, String userId)
UserRequiredActionsFederatedStorageuserId.getRequiredActionsStream in interface UserRequiredActionsFederatedStoragegetRequiredActionsStream in interface UserRequiredActionsFederatedStorage.Streamsrealm - a reference to the realm.userId - the user identifier.Stream of required action names.public void addRequiredAction(RealmModel realm, String userId, String action)
addRequiredAction in interface UserRequiredActionsFederatedStoragepublic void removeRequiredAction(RealmModel realm, String userId, String action)
removeRequiredAction in interface UserRequiredActionsFederatedStoragepublic void grantRole(RealmModel realm, String userId, RoleModel role)
grantRole in interface UserRoleMappingsFederatedStoragepublic Stream<RoleModel> getRoleMappingsStream(RealmModel realm, String userId)
UserRoleMappingsFederatedStorageuserId.getRoleMappingsStream in interface UserRoleMappingsFederatedStoragegetRoleMappingsStream in interface UserRoleMappingsFederatedStorage.Streamsrealm - a reference to the realm.userId - the user identifier.Stream of roles.public void deleteRoleMapping(RealmModel realm, String userId, RoleModel role)
deleteRoleMapping in interface UserRoleMappingsFederatedStoragepublic void updateCredential(RealmModel realm, String userId, CredentialModel cred)
updateCredential in interface UserFederatedUserCredentialStorepublic CredentialModel createCredential(RealmModel realm, String userId, CredentialModel cred)
createCredential in interface UserFederatedUserCredentialStorepublic boolean removeStoredCredential(RealmModel realm, String userId, String id)
removeStoredCredential in interface UserFederatedUserCredentialStorepublic CredentialModel getStoredCredentialById(RealmModel realm, String userId, String id)
getStoredCredentialById in interface UserFederatedUserCredentialStoreprotected CredentialModel toModel(FederatedUserCredentialEntity entity)
public Stream<CredentialModel> getStoredCredentialsStream(RealmModel realm, String userId)
UserFederatedUserCredentialStoreuserId.getStoredCredentialsStream in interface UserFederatedUserCredentialStoregetStoredCredentialsStream in interface UserFederatedUserCredentialStore.Streamsrealm - a reference to the realm.userId - the user identifier.Stream of credentials.public Stream<CredentialModel> getStoredCredentialsByTypeStream(RealmModel realm, String userId, String type)
UserFederatedUserCredentialStoretype that are associated with the federated user identified by userId.getStoredCredentialsByTypeStream in interface UserFederatedUserCredentialStoregetStoredCredentialsByTypeStream in interface UserFederatedUserCredentialStore.Streamsrealm - a reference to the realm.userId - the user identifier.type - the credential type.Stream of credentials.public CredentialModel getStoredCredentialByNameAndType(RealmModel realm, String userId, String name, String type)
getStoredCredentialByNameAndType in interface UserFederatedUserCredentialStorepublic Stream<String> getStoredUsersStream(RealmModel realm, Integer first, Integer max)
UserFederatedStorageProvidergetStoredUsersStream in interface UserFederatedStorageProvidergetStoredUsersStream in interface UserFederatedStorageProvider.Streamsrealm - a reference to the realm.first - first result to return. Ignored if negative or null.max - maximum number of results to return. Ignored if negative or null.Stream of federated user ids.public void updateCredential(RealmModel realm, UserModel user, CredentialModel cred)
updateCredential in interface UserCredentialStorepublic CredentialModel createCredential(RealmModel realm, UserModel user, CredentialModel cred)
createCredential in interface UserCredentialStorepublic boolean removeStoredCredential(RealmModel realm, UserModel user, String id)
removeStoredCredential in interface UserCredentialStorepublic CredentialModel getStoredCredentialById(RealmModel realm, UserModel user, String id)
getStoredCredentialById in interface UserCredentialStorepublic Stream<CredentialModel> getStoredCredentialsStream(RealmModel realm, UserModel user)
UserCredentialStoregetStoredCredentialsStream in interface UserCredentialStoregetStoredCredentialsStream in interface UserCredentialStore.Streamsrealm - a reference to the realm.user - the user whose credentials are being searched.Stream of credentials.public Stream<CredentialModel> getStoredCredentialsByTypeStream(RealmModel realm, UserModel user, String type)
UserCredentialStoregetStoredCredentialsByTypeStream in interface UserCredentialStoregetStoredCredentialsByTypeStream in interface UserCredentialStore.Streamsrealm - a reference to the realm.user - the user whose credentials are being searched.type - the type of credentials being searched.Stream of credentials.public CredentialModel getStoredCredentialByNameAndType(RealmModel realm, UserModel user, String name, String type)
getStoredCredentialByNameAndType in interface UserCredentialStorepublic boolean moveCredentialTo(RealmModel realm, UserModel user, String id, String newPreviousCredentialId)
moveCredentialTo in interface UserCredentialStorepublic int getStoredUsersCount(RealmModel realm)
getStoredUsersCount in interface UserFederatedStorageProviderpublic void preRemove(RealmModel realm)
preRemove in interface UserFederatedStorageProviderpublic void preRemove(RealmModel realm, RoleModel role)
preRemove in interface UserFederatedStorageProviderpublic void preRemove(RealmModel realm, GroupModel group)
preRemove in interface UserFederatedStorageProviderpublic void preRemove(RealmModel realm, ClientModel client)
preRemove in interface UserFederatedStorageProviderpublic void preRemove(ProtocolMapperModel protocolMapper)
preRemove in interface UserFederatedStorageProviderpublic void preRemove(ClientScopeModel clientScope)
preRemove in interface UserFederatedStorageProviderpublic void preRemove(RealmModel realm, UserModel user)
preRemove in interface UserFederatedStorageProviderpublic void preRemove(RealmModel realm, ComponentModel model)
preRemove in interface UserFederatedStorageProviderCopyright © 2021 JBoss by Red Hat. All rights reserved.