Class SubjectCredentialManagerCacheAdapter
- java.lang.Object
-
- org.keycloak.storage.AbstractStorageManager<UserStorageProvider,UserStorageProviderModel>
-
- org.keycloak.credential.LegacyUserCredentialManager
-
- org.keycloak.models.cache.infinispan.SubjectCredentialManagerCacheAdapter
-
- All Implemented Interfaces:
SubjectCredentialManager
public abstract class SubjectCredentialManagerCacheAdapter extends LegacyUserCredentialManager
- Author:
- Alexander Schwartz
-
-
Constructor Summary
Constructors Constructor Description SubjectCredentialManagerCacheAdapter(KeycloakSession session, RealmModel realm, UserModel user)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description CredentialModel
createCredentialThroughProvider(CredentialModel model)
CredentialModel
createStoredCredential(CredentialModel cred)
Updates a credential of the entity with an updatedCredentialModel
.void
disableCredentialType(String credentialType)
Disable a credential by type.abstract void
invalidateCacheForEntity()
boolean
moveStoredCredentialTo(String id, String newPreviousCredentialId)
Re-order the stored credentials.boolean
removeStoredCredentialById(String id)
Updates a credential of the entity with an updatedCredentialModel
.boolean
updateCredential(CredentialInput input)
Updates a credential of the entity with the inputs provided by the entity.void
updateCredentialLabel(String credentialId, String userLabel)
Update the label for a stored credentials chosen by the owner of the entity.void
updateStoredCredential(CredentialModel cred)
Updates a credential of the entity with an updatedCredentialModel
.-
Methods inherited from class org.keycloak.credential.LegacyUserCredentialManager
getConfiguredUserStorageCredentialTypesStream, getDisableableCredentialTypesStream, getStoredCredentialById, getStoredCredentialByNameAndType, getStoredCredentialsByTypeStream, getStoredCredentialsStream, isConfiguredFor, isConfiguredLocally, isValid
-
Methods inherited from class org.keycloak.storage.AbstractStorageManager
consumeEnabledStorageProvidersWithTimeout, flatMapEnabledStorageProvidersWithTimeout, getEnabledStorageProviders, getStorageProviderFactory, getStorageProviderInstance, getStorageProviderInstance, getStorageProviderInstance, getStorageProviderInstance, getStorageProviderModel, getStorageProviderModels, getStorageProviderTimeout, mapEnabledStorageProvidersWithTimeout
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.keycloak.models.SubjectCredentialManager
isValid
-
-
-
-
Constructor Detail
-
SubjectCredentialManagerCacheAdapter
public SubjectCredentialManagerCacheAdapter(KeycloakSession session, RealmModel realm, UserModel user)
-
-
Method Detail
-
invalidateCacheForEntity
public abstract void invalidateCacheForEntity()
-
updateCredential
public boolean updateCredential(CredentialInput input)
Description copied from interface:SubjectCredentialManager
Updates a credential of the entity with the inputs provided by the entity.- Specified by:
updateCredential
in interfaceSubjectCredentialManager
- Overrides:
updateCredential
in classLegacyUserCredentialManager
- Returns:
true
if credentials have been updated successfully
-
updateStoredCredential
public void updateStoredCredential(CredentialModel cred)
Description copied from interface:SubjectCredentialManager
Updates a credential of the entity with an updatedCredentialModel
. Usually called by aCredentialProvider
.- Specified by:
updateStoredCredential
in interfaceSubjectCredentialManager
- Overrides:
updateStoredCredential
in classLegacyUserCredentialManager
-
createStoredCredential
public CredentialModel createStoredCredential(CredentialModel cred)
Description copied from interface:SubjectCredentialManager
Updates a credential of the entity with an updatedCredentialModel
. Usually called by aCredentialProvider
.- Specified by:
createStoredCredential
in interfaceSubjectCredentialManager
- Overrides:
createStoredCredential
in classLegacyUserCredentialManager
-
removeStoredCredentialById
public boolean removeStoredCredentialById(String id)
Description copied from interface:SubjectCredentialManager
Updates a credential of the entity with an updatedCredentialModel
. Usually called by aCredentialProvider
, or from the account management when a user removes, for example, an OTP token.- Specified by:
removeStoredCredentialById
in interfaceSubjectCredentialManager
- Overrides:
removeStoredCredentialById
in classLegacyUserCredentialManager
-
moveStoredCredentialTo
public boolean moveStoredCredentialTo(String id, String newPreviousCredentialId)
Description copied from interface:SubjectCredentialManager
Re-order the stored credentials.- Specified by:
moveStoredCredentialTo
in interfaceSubjectCredentialManager
- Overrides:
moveStoredCredentialTo
in classLegacyUserCredentialManager
-
updateCredentialLabel
public void updateCredentialLabel(String credentialId, String userLabel)
Description copied from interface:SubjectCredentialManager
Update the label for a stored credentials chosen by the owner of the entity.- Specified by:
updateCredentialLabel
in interfaceSubjectCredentialManager
- Overrides:
updateCredentialLabel
in classLegacyUserCredentialManager
-
disableCredentialType
public void disableCredentialType(String credentialType)
Description copied from interface:SubjectCredentialManager
Disable a credential by type.- Specified by:
disableCredentialType
in interfaceSubjectCredentialManager
- Overrides:
disableCredentialType
in classLegacyUserCredentialManager
-
createCredentialThroughProvider
public CredentialModel createCredentialThroughProvider(CredentialModel model)
- Specified by:
createCredentialThroughProvider
in interfaceSubjectCredentialManager
- Overrides:
createCredentialThroughProvider
in classLegacyUserCredentialManager
-
-