Package org.keycloak.models
Interface SubjectCredentialManager
- 
- All Known Implementing Classes:
- LegacyUserCredentialManager,- MapUserCredentialManager,- SubjectCredentialManagerCacheAdapter
 
 public interface SubjectCredentialManagerValidates and manages the credentials of a known entity (for example, a user).
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description CredentialModelcreateCredentialThroughProvider(CredentialModel model)Deprecated.CredentialModelcreateStoredCredential(CredentialModel cred)Updates a credential of the entity with an updatedCredentialModel.voiddisableCredentialType(String credentialType)Disable a credential by type.Stream<String>getConfiguredUserStorageCredentialTypesStream()Deprecated.Stream<String>getDisableableCredentialTypesStream()List the credentials that can be disabled, for example, to show the list to the entity (aka user) or an admin.CredentialModelgetStoredCredentialById(String id)Read a stored credential.CredentialModelgetStoredCredentialByNameAndType(String name, String type)Stream<CredentialModel>getStoredCredentialsByTypeStream(String type)Read stored credentials by type as a stream.Stream<CredentialModel>getStoredCredentialsStream()Read stored credentials as a stream.booleanisConfiguredFor(String type)Check if the credential type is configured for this entity.booleanisConfiguredLocally(String type)Deprecated.booleanisValid(List<CredentialInput> inputs)Validate a list of credentials.default booleanisValid(CredentialInput... inputs)Validate a list of credentials.booleanmoveStoredCredentialTo(String id, String newPreviousCredentialId)Re-order the stored credentials.booleanremoveStoredCredentialById(String id)Updates a credential of the entity with an updatedCredentialModel.booleanupdateCredential(CredentialInput input)Updates a credential of the entity with the inputs provided by the entity.voidupdateCredentialLabel(String credentialId, String credentialLabel)Update the label for a stored credentials chosen by the owner of the entity.voidupdateStoredCredential(CredentialModel cred)Updates a credential of the entity with an updatedCredentialModel.
 
- 
- 
- 
Method Detail- 
isValidboolean isValid(List<CredentialInput> inputs) Validate a list of credentials.- Returns:
- trueif inputs are valid
 
 - 
isValiddefault boolean isValid(CredentialInput... inputs) Validate a list of credentials.- Returns:
- trueif inputs are valid
 
 - 
updateCredentialboolean updateCredential(CredentialInput input) Updates a credential of the entity with the inputs provided by the entity.- Returns:
- trueif credentials have been updated successfully
 
 - 
updateStoredCredentialvoid updateStoredCredential(CredentialModel cred) Updates a credential of the entity with an updatedCredentialModel. Usually called by aCredentialProvider.
 - 
createStoredCredentialCredentialModel createStoredCredential(CredentialModel cred) Updates a credential of the entity with an updatedCredentialModel. Usually called by aCredentialProvider.
 - 
removeStoredCredentialByIdboolean removeStoredCredentialById(String id) 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.
 - 
getStoredCredentialByIdCredentialModel getStoredCredentialById(String id) Read a stored credential.
 - 
getStoredCredentialsStreamStream<CredentialModel> getStoredCredentialsStream() Read stored credentials as a stream.
 - 
getStoredCredentialsByTypeStreamStream<CredentialModel> getStoredCredentialsByTypeStream(String type) Read stored credentials by type as a stream.
 - 
getStoredCredentialByNameAndTypeCredentialModel getStoredCredentialByNameAndType(String name, String type) 
 - 
moveStoredCredentialToboolean moveStoredCredentialTo(String id, String newPreviousCredentialId) Re-order the stored credentials.
 - 
updateCredentialLabelvoid updateCredentialLabel(String credentialId, String credentialLabel) Update the label for a stored credentials chosen by the owner of the entity.
 - 
disableCredentialTypevoid disableCredentialType(String credentialType) Disable a credential by type.
 - 
getDisableableCredentialTypesStreamStream<String> getDisableableCredentialTypesStream() List the credentials that can be disabled, for example, to show the list to the entity (aka user) or an admin.- Returns:
- stream with credential types that can be disabled
 
 - 
isConfiguredForboolean isConfiguredFor(String type) Check if the credential type is configured for this entity.- Parameters:
- type- credential type to check
- Returns:
- trueif the credential type has been
 
 - 
isConfiguredLocally@Deprecated boolean isConfiguredLocally(String type) Deprecated.
 - 
getConfiguredUserStorageCredentialTypesStream@Deprecated Stream<String> getConfiguredUserStorageCredentialTypesStream() Deprecated.
 - 
createCredentialThroughProvider@Deprecated CredentialModel createCredentialThroughProvider(CredentialModel model) Deprecated.
 
- 
 
-