Package org.keycloak.credential
Interface UserCredentialStore
-
- All Superinterfaces:
Provider
- All Known Subinterfaces:
UserCredentialManager
,UserCredentialManager.Streams
,UserCredentialStore.Streams
- All Known Implementing Classes:
JpaUserCredentialStore
,JpaUserFederatedStorageProvider
,JpaUserProvider
,UserCredentialStoreManager
public interface UserCredentialStore extends Provider
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
UserCredentialStore.Streams
Deprecated.This interface is no longer necessary, collection-based methods were removed from the parent interface and therefore the parent interface can be used directly
-
Method Summary
-
-
-
Method Detail
-
updateCredential
void updateCredential(RealmModel realm, UserModel user, CredentialModel cred)
-
createCredential
CredentialModel createCredential(RealmModel realm, UserModel user, CredentialModel cred)
-
removeStoredCredential
boolean removeStoredCredential(RealmModel realm, UserModel user, String id)
Removes credential with theid
for theuser
.- 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
CredentialModel getStoredCredentialById(RealmModel realm, UserModel user, String id)
-
getStoredCredentialsStream
Stream<CredentialModel> getStoredCredentialsStream(RealmModel realm, UserModel user)
Obtains the stored credentials associated with the specified user.- Parameters:
realm
- a reference to the realm.user
- the user whose credentials are being searched.- Returns:
- a non-null
Stream
of credentials.
-
getStoredCredentialsByTypeStream
Stream<CredentialModel> getStoredCredentialsByTypeStream(RealmModel realm, UserModel user, String type)
Obtains the stored credentials associated with the specified user that match the specified type.- 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
CredentialModel getStoredCredentialByNameAndType(RealmModel realm, UserModel user, String name, String type)
-
moveCredentialTo
boolean moveCredentialTo(RealmModel realm, UserModel user, String id, String newPreviousCredentialId)
-
-