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 Constructor Description UserCredentialStoreManager(KeycloakSession session)
Deprecated.
-
Method Summary
-
-
-
Constructor Detail
-
UserCredentialStoreManager
public UserCredentialStoreManager(KeycloakSession session)
Deprecated.
-
-
Method Detail
-
updateCredential
@Deprecated public void updateCredential(RealmModel realm, UserModel user, CredentialModel cred)
Deprecated.- Specified by:
updateCredential
in interfaceUserCredentialStore
-
createCredential
@Deprecated public CredentialModel createCredential(RealmModel realm, UserModel user, CredentialModel cred)
Deprecated.- Specified by:
createCredential
in interfaceUserCredentialStore
-
removeStoredCredential
@Deprecated public boolean removeStoredCredential(RealmModel realm, UserModel user, String id)
Deprecated.Description copied from interface:UserCredentialStore
Removes credential with theid
for theuser
.- Specified by:
removeStoredCredential
in interfaceUserCredentialStore
- Parameters:
realm
- realm.user
- userid
- id- Returns:
true
if the credential was removed,false
otherwise 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:
getStoredCredentialById
in interfaceUserCredentialStore
-
getStoredCredentialsStream
@Deprecated public Stream<CredentialModel> getStoredCredentialsStream(RealmModel realm, UserModel user)
Deprecated.Description copied from interface:UserCredentialStore
Obtains the stored credentials associated with the specified user.- Specified by:
getStoredCredentialsStream
in interfaceUserCredentialStore
- Parameters:
realm
- a reference to the realm.user
- the user whose credentials are being searched.- Returns:
- a non-null
Stream
of credentials.
-
getStoredCredentialsByTypeStream
@Deprecated public Stream<CredentialModel> getStoredCredentialsByTypeStream(RealmModel realm, UserModel user, String type)
Deprecated.Description copied from interface:UserCredentialStore
Obtains the stored credentials associated with the specified user that match the specified type.- Specified by:
getStoredCredentialsByTypeStream
in 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
Stream
of credentials.
-
getStoredCredentialByNameAndType
@Deprecated public CredentialModel getStoredCredentialByNameAndType(RealmModel realm, UserModel user, String name, String type)
Deprecated.- Specified by:
getStoredCredentialByNameAndType
in interfaceUserCredentialStore
-
moveCredentialTo
@Deprecated public boolean moveCredentialTo(RealmModel realm, UserModel user, String id, String newPreviousCredentialId)
Deprecated.- Specified by:
moveCredentialTo
in interfaceUserCredentialStore
-
isValid
@Deprecated public boolean isValid(RealmModel realm, UserModel user, CredentialInput... inputs)
Deprecated.Description copied from interface:UserCredentialManager
Validates list of credentials. Will call UserStorageProvider and UserFederationProviders first, then loop through each CredentialProvider.- Specified by:
isValid
in interfaceUserCredentialManager
- Returns:
-
createCredentialThroughProvider
@Deprecated public CredentialModel createCredentialThroughProvider(RealmModel realm, UserModel user, CredentialModel model)
Deprecated.Description copied from interface:UserCredentialManager
Creates a credential from the credentialModel, by looping through the providers to find a match for the type- Specified by:
createCredentialThroughProvider
in interfaceUserCredentialManager
- Returns:
-
updateCredentialLabel
@Deprecated public void updateCredentialLabel(RealmModel realm, UserModel user, String credentialId, String userLabel)
Deprecated.Description copied from interface:UserCredentialManager
Updates the credential label and invalidates the cache for the user.- Specified by:
updateCredentialLabel
in interfaceUserCredentialManager
-
isValid
@Deprecated public boolean isValid(RealmModel realm, UserModel user, List<CredentialInput> inputs)
Deprecated.Description copied from interface:UserCredentialManager
Validates list of credentials. Will call UserStorageProvider and UserFederationProviders first, then loop through each CredentialProvider.- Specified by:
isValid
in 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:UserCredentialManager
Updates a credential. Will call UserStorageProvider and UserFederationProviders first, then loop through each CredentialProvider. Update is finished whenever any one provider returns true.- Specified by:
updateCredential
in 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:UserCredentialManager
Calls disableCredential on UserStorageProvider and UserFederationProviders first, then loop through each CredentialProvider.- Specified by:
disableCredentialType
in interfaceUserCredentialManager
-
getDisableableCredentialTypesStream
@Deprecated public Stream<String> getDisableableCredentialTypesStream(RealmModel realm, UserModel user)
Deprecated.Description copied from interface:UserCredentialManager
Obtains the credential types that can be disabled. method.- Specified by:
getDisableableCredentialTypesStream
in interfaceUserCredentialManager
- Parameters:
realm
- a reference to the realm.user
- the user whose credentials are being searched.- Returns:
- a non-null
Stream
of credential types.
-
isConfiguredFor
@Deprecated public boolean isConfiguredFor(RealmModel realm, UserModel user, String type)
Deprecated.Description copied from interface:UserCredentialManager
Checks to see if user has credential type configured. Looks in UserStorageProvider or UserFederationProvider first, then loops through each CredentialProvider.- Specified by:
isConfiguredFor
in interfaceUserCredentialManager
- Returns:
-
isConfiguredLocally
@Deprecated public boolean isConfiguredLocally(RealmModel realm, UserModel user, String type)
Deprecated.Description copied from interface:UserCredentialManager
Only 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:
isConfiguredLocally
in interfaceUserCredentialManager
- Returns:
-
authenticate
@Deprecated public CredentialValidationOutput authenticate(KeycloakSession session, RealmModel realm, CredentialInput input)
Deprecated.Description copied from interface:UserCredentialManager
Given 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:
authenticate
in interfaceUserCredentialManager
- Returns:
-
onCache
@Deprecated public void onCache(RealmModel realm, CachedUserModel user, UserModel delegate)
Deprecated.- Specified by:
onCache
in interfaceOnUserCache
-
getConfiguredUserStorageCredentialTypesStream
@Deprecated public Stream<String> getConfiguredUserStorageCredentialTypesStream(RealmModel realm, UserModel user)
Deprecated.Description copied from interface:UserCredentialManager
Obtains 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:
getConfiguredUserStorageCredentialTypesStream
in interfaceUserCredentialManager
- Parameters:
realm
- a reference to the realm.user
- a reference to the user.- Returns:
- a non-null
Stream
of credential types.
-
-