Package org.keycloak.credential
Class UserCredentialStoreManager
java.lang.Object
org.keycloak.credential.UserCredentialStoreManager
- All Implemented Interfaces:
UserCredentialStore,OnUserCache,UserCredentialManager,Provider
@Deprecated
public class UserCredentialStoreManager
extends Object
implements UserCredentialManager, OnUserCache
Deprecated.
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.models.UserCredentialManager
UserCredentialManager.Streams -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthenticate(KeycloakSession session, RealmModel realm, CredentialInput input) Deprecated.voidclose()Deprecated.createCredential(RealmModel realm, UserModel user, CredentialModel cred) Deprecated.createCredentialThroughProvider(RealmModel realm, UserModel user, CredentialModel model) Deprecated.voiddisableCredentialType(RealmModel realm, UserModel user, String credentialType) Deprecated.Deprecated.static <T> Stream<T>getCredentialProviders(KeycloakSession session, Class<T> type) Deprecated.getDisableableCredentialTypesStream(RealmModel realm, UserModel user) Deprecated.getStoredCredentialById(RealmModel realm, UserModel user, String id) Deprecated.getStoredCredentialByNameAndType(RealmModel realm, UserModel user, String name, String type) Deprecated.getStoredCredentialsByTypeStream(RealmModel realm, UserModel user, String type) Deprecated.getStoredCredentialsStream(RealmModel realm, UserModel user) Deprecated.booleanisConfiguredFor(RealmModel realm, UserModel user, String type) Deprecated.booleanisConfiguredLocally(RealmModel realm, UserModel user, String type) Deprecated.booleanisValid(RealmModel realm, UserModel user, List<CredentialInput> inputs) Deprecated.booleanisValid(RealmModel realm, UserModel user, CredentialInput... inputs) Deprecated.booleanmoveCredentialTo(RealmModel realm, UserModel user, String id, String newPreviousCredentialId) Deprecated.voidonCache(RealmModel realm, CachedUserModel user, UserModel delegate) Deprecated.booleanremoveStoredCredential(RealmModel realm, UserModel user, String id) Deprecated.booleanupdateCredential(RealmModel realm, UserModel user, CredentialInput input) Deprecated.voidupdateCredential(RealmModel realm, UserModel user, CredentialModel cred) Deprecated.voidupdateCredentialLabel(RealmModel realm, UserModel user, String credentialId, String userLabel) Deprecated.
-
Constructor Details
-
UserCredentialStoreManager
Deprecated.
-
-
Method Details
-
updateCredential
Deprecated.- Specified by:
updateCredentialin interfaceUserCredentialStore
-
createCredential
@Deprecated public CredentialModel createCredential(RealmModel realm, UserModel user, CredentialModel cred) Deprecated.- Specified by:
createCredentialin interfaceUserCredentialStore
-
removeStoredCredential
Deprecated.Description copied from interface:UserCredentialStoreRemoves credential with theidfor theuser.- Specified by:
removeStoredCredentialin interfaceUserCredentialStore- Parameters:
realm- realm.user- userid- id- Returns:
trueif the credential was removed,falseotherwise TODO: Make this method return Boolean so that store can return "I don't know" answer, this can be used for example in async stores
-
getStoredCredentialById
@Deprecated public CredentialModel getStoredCredentialById(RealmModel realm, UserModel user, String id) Deprecated.- Specified by:
getStoredCredentialByIdin interfaceUserCredentialStore
-
getStoredCredentialsStream
@Deprecated public Stream<CredentialModel> getStoredCredentialsStream(RealmModel realm, UserModel user) Deprecated.Description copied from interface:UserCredentialStoreObtains the stored credentials associated with the specified user.- Specified by:
getStoredCredentialsStreamin interfaceUserCredentialStore- Parameters:
realm- a reference to the realm.user- the user whose credentials are being searched.- Returns:
- a non-null
Streamof credentials.
-
getStoredCredentialsByTypeStream
@Deprecated public Stream<CredentialModel> getStoredCredentialsByTypeStream(RealmModel realm, UserModel user, String type) Deprecated.Description copied from interface:UserCredentialStoreObtains the stored credentials associated with the specified user that match the specified type.- Specified by:
getStoredCredentialsByTypeStreamin interfaceUserCredentialStore- Parameters:
realm- a reference to the realm.user- the user whose credentials are being searched.type- the type of credentials being searched.- Returns:
- a non-null
Streamof credentials.
-
getStoredCredentialByNameAndType
@Deprecated public CredentialModel getStoredCredentialByNameAndType(RealmModel realm, UserModel user, String name, String type) Deprecated.- Specified by:
getStoredCredentialByNameAndTypein interfaceUserCredentialStore
-
moveCredentialTo
@Deprecated public boolean moveCredentialTo(RealmModel realm, UserModel user, String id, String newPreviousCredentialId) Deprecated.- Specified by:
moveCredentialToin interfaceUserCredentialStore
-
isValid
Deprecated.Description copied from interface:UserCredentialManagerValidates list of credentials. Will call UserStorageProvider and UserFederationProviders first, then loop through each CredentialProvider.- Specified by:
isValidin interfaceUserCredentialManager- Returns:
-
createCredentialThroughProvider
@Deprecated public CredentialModel createCredentialThroughProvider(RealmModel realm, UserModel user, CredentialModel model) Deprecated.Description copied from interface:UserCredentialManagerCreates a credential from the credentialModel, by looping through the providers to find a match for the type- Specified by:
createCredentialThroughProviderin interfaceUserCredentialManager- Returns:
-
updateCredentialLabel
@Deprecated public void updateCredentialLabel(RealmModel realm, UserModel user, String credentialId, String userLabel) Deprecated.Description copied from interface:UserCredentialManagerUpdates the credential label and invalidates the cache for the user.- Specified by:
updateCredentialLabelin interfaceUserCredentialManager
-
isValid
Deprecated.Description copied from interface:UserCredentialManagerValidates list of credentials. Will call UserStorageProvider and UserFederationProviders first, then loop through each CredentialProvider.- Specified by:
isValidin interfaceUserCredentialManager- Returns:
-
getCredentialProviders
@Deprecated public static <T> Stream<T> getCredentialProviders(KeycloakSession session, Class<T> type) Deprecated. -
updateCredential
@Deprecated public boolean updateCredential(RealmModel realm, UserModel user, CredentialInput input) Deprecated.Description copied from interface:UserCredentialManagerUpdates a credential. Will call UserStorageProvider and UserFederationProviders first, then loop through each CredentialProvider. Update is finished whenever any one provider returns true.- Specified by:
updateCredentialin interfaceUserCredentialManager- Returns:
- true if credential was successfully updated by UserStorage or any CredentialInputUpdater
-
disableCredentialType
@Deprecated public void disableCredentialType(RealmModel realm, UserModel user, String credentialType) Deprecated.Description copied from interface:UserCredentialManagerCalls disableCredential on UserStorageProvider and UserFederationProviders first, then loop through each CredentialProvider.- Specified by:
disableCredentialTypein interfaceUserCredentialManager
-
getDisableableCredentialTypesStream
@Deprecated public Stream<String> getDisableableCredentialTypesStream(RealmModel realm, UserModel user) Deprecated.Description copied from interface:UserCredentialManagerObtains the credential types that can be disabled. method.- Specified by:
getDisableableCredentialTypesStreamin interfaceUserCredentialManager- Parameters:
realm- a reference to the realm.user- the user whose credentials are being searched.- Returns:
- a non-null
Streamof credential types.
-
isConfiguredFor
Deprecated.Description copied from interface:UserCredentialManagerChecks to see if user has credential type configured. Looks in UserStorageProvider or UserFederationProvider first, then loops through each CredentialProvider.- Specified by:
isConfiguredForin interfaceUserCredentialManager- Returns:
-
isConfiguredLocally
Deprecated.Description copied from interface:UserCredentialManagerOnly loops through each CredentialProvider to see if credential type is configured for the user. This allows UserStorageProvider and UserFederationProvider isValid() implementations to punt to local storage when validating a credential that has been overriden in Keycloak storage.- Specified by:
isConfiguredLocallyin interfaceUserCredentialManager- Returns:
-
authenticate
@Deprecated public CredentialValidationOutput authenticate(KeycloakSession session, RealmModel realm, CredentialInput input) Deprecated.Description copied from interface:UserCredentialManagerGiven a CredentialInput, authenticate the user. This is used in the case where the credential must be processed to determine and find the user. An example is Kerberos where the kerberos token might be validated and processed by a variety of different storage providers.- Specified by:
authenticatein interfaceUserCredentialManager- Returns:
-
onCache
Deprecated.- Specified by:
onCachein interfaceOnUserCache
-
getConfiguredUserStorageCredentialTypesStream
@Deprecated public Stream<String> getConfiguredUserStorageCredentialTypesStream(RealmModel realm, UserModel user) Deprecated.Description copied from interface:UserCredentialManagerObtains the credential types provided by the user storage where the specified user is stored. Examples of returned values are "password", "otp", etc. This method will always return an empty stream for "local" users - i.e. users that are not backed by any user storage.- Specified by:
getConfiguredUserStorageCredentialTypesStreamin interfaceUserCredentialManager- Parameters:
realm- a reference to the realm.user- a reference to the user.- Returns:
- a non-null
Streamof credential types.
-
close
public void close()Deprecated.
-