public class UserCredentialStoreManager extends AbstractStorageManager<UserStorageProvider,UserStorageProviderModel> implements UserCredentialManager.Streams, OnUserCache
UserCredentialManager.Streamssession| Constructor and Description |
|---|
UserCredentialStoreManager(KeycloakSession session) |
| Modifier and Type | Method and Description |
|---|---|
CredentialValidationOutput |
authenticate(KeycloakSession session,
RealmModel realm,
CredentialInput input)
Given a CredentialInput, authenticate the user.
|
void |
close() |
CredentialModel |
createCredential(RealmModel realm,
UserModel user,
CredentialModel cred) |
CredentialModel |
createCredentialThroughProvider(RealmModel realm,
UserModel user,
CredentialModel model)
Creates a credential from the credentialModel, by looping through the providers to find a match for the type
|
void |
disableCredentialType(RealmModel realm,
UserModel user,
String credentialType)
Calls disableCredential on UserStorageProvider and UserFederationProviders first, then loop through
each CredentialProvider.
|
Stream<String> |
getConfiguredUserStorageCredentialTypesStream(RealmModel realm,
UserModel user)
Obtains the credential types provided by the user storage where the specified user is stored.
|
static <T> Stream<T> |
getCredentialProviders(KeycloakSession session,
Class<T> type) |
Stream<String> |
getDisableableCredentialTypesStream(RealmModel realm,
UserModel user)
Obtains the credential types that can be disabled by means of the
UserCredentialManager.disableCredentialType(RealmModel, UserModel, String)
method. |
CredentialModel |
getStoredCredentialById(RealmModel realm,
UserModel user,
String id) |
CredentialModel |
getStoredCredentialByNameAndType(RealmModel realm,
UserModel user,
String name,
String type) |
Stream<CredentialModel> |
getStoredCredentialsByTypeStream(RealmModel realm,
UserModel user,
String type)
Obtains the stored credentials associated with the specified user that match the specified type.
|
Stream<CredentialModel> |
getStoredCredentialsStream(RealmModel realm,
UserModel user)
Obtains the stored credentials associated with the specified user.
|
protected UserCredentialStore |
getStoreForUser(UserModel user) |
boolean |
isConfiguredFor(RealmModel realm,
UserModel user,
String type)
Checks to see if user has credential type configured.
|
boolean |
isConfiguredLocally(RealmModel realm,
UserModel user,
String type)
Only loops through each CredentialProvider to see if credential type is configured for the user.
|
boolean |
isValid(RealmModel realm,
UserModel user,
CredentialInput... inputs)
Validates list of credentials.
|
boolean |
isValid(RealmModel realm,
UserModel user,
List<CredentialInput> inputs)
Validates list of credentials.
|
boolean |
moveCredentialTo(RealmModel realm,
UserModel user,
String id,
String newPreviousCredentialId) |
void |
onCache(RealmModel realm,
CachedUserModel user,
UserModel delegate) |
boolean |
removeStoredCredential(RealmModel realm,
UserModel user,
String id) |
boolean |
updateCredential(RealmModel realm,
UserModel user,
CredentialInput input)
Updates a credential.
|
void |
updateCredential(RealmModel realm,
UserModel user,
CredentialModel cred) |
void |
updateCredentialLabel(RealmModel realm,
UserModel user,
String credentialId,
String userLabel)
Updates the credential label and invalidates the cache for the user.
|
consumeEnabledStorageProvidersWithTimeout, flatMapEnabledStorageProvidersWithTimeout, getEnabledStorageProviders, getStorageProviderFactory, getStorageProviderInstance, getStorageProviderInstance, getStorageProviderInstance, getStorageProviderInstance, getStorageProviderModel, getStorageProviderModels, getStorageProviderTimeout, mapEnabledStorageProvidersWithTimeoutclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConfiguredUserStorageCredentialTypes, getDisableableCredentialTypesgetStoredCredentials, getStoredCredentialsByTypepublic UserCredentialStoreManager(KeycloakSession session)
protected UserCredentialStore getStoreForUser(UserModel user)
public void updateCredential(RealmModel realm, UserModel user, CredentialModel cred)
updateCredential in interface UserCredentialStorepublic CredentialModel createCredential(RealmModel realm, UserModel user, CredentialModel cred)
createCredential in interface UserCredentialStorepublic boolean removeStoredCredential(RealmModel realm, UserModel user, String id)
removeStoredCredential in interface UserCredentialStorepublic CredentialModel getStoredCredentialById(RealmModel realm, UserModel user, String id)
getStoredCredentialById in interface UserCredentialStorepublic Stream<CredentialModel> getStoredCredentialsStream(RealmModel realm, UserModel user)
UserCredentialStoregetStoredCredentialsStream in interface UserCredentialStoregetStoredCredentialsStream in interface UserCredentialStore.Streamsrealm - a reference to the realm.user - the user whose credentials are being searched.Stream of credentials.public Stream<CredentialModel> getStoredCredentialsByTypeStream(RealmModel realm, UserModel user, String type)
UserCredentialStoregetStoredCredentialsByTypeStream in interface UserCredentialStoregetStoredCredentialsByTypeStream in interface UserCredentialStore.Streamsrealm - a reference to the realm.user - the user whose credentials are being searched.type - the type of credentials being searched.Stream of credentials.public CredentialModel getStoredCredentialByNameAndType(RealmModel realm, UserModel user, String name, String type)
getStoredCredentialByNameAndType in interface UserCredentialStorepublic boolean moveCredentialTo(RealmModel realm, UserModel user, String id, String newPreviousCredentialId)
moveCredentialTo in interface UserCredentialStorepublic boolean isValid(RealmModel realm, UserModel user, CredentialInput... inputs)
UserCredentialManagerisValid in interface UserCredentialManagerpublic CredentialModel createCredentialThroughProvider(RealmModel realm, UserModel user, CredentialModel model)
UserCredentialManagercreateCredentialThroughProvider in interface UserCredentialManagerpublic void updateCredentialLabel(RealmModel realm, UserModel user, String credentialId, String userLabel)
UserCredentialManagerupdateCredentialLabel in interface UserCredentialManagerpublic boolean isValid(RealmModel realm, UserModel user, List<CredentialInput> inputs)
UserCredentialManagerisValid in interface UserCredentialManagerpublic static <T> Stream<T> getCredentialProviders(KeycloakSession session, Class<T> type)
public boolean updateCredential(RealmModel realm, UserModel user, CredentialInput input)
UserCredentialManagerupdateCredential in interface UserCredentialManagerpublic void disableCredentialType(RealmModel realm, UserModel user, String credentialType)
UserCredentialManagerdisableCredentialType in interface UserCredentialManagerpublic Stream<String> getDisableableCredentialTypesStream(RealmModel realm, UserModel user)
UserCredentialManagerUserCredentialManager.disableCredentialType(RealmModel, UserModel, String)
method.getDisableableCredentialTypesStream in interface UserCredentialManagergetDisableableCredentialTypesStream in interface UserCredentialManager.Streamsrealm - a reference to the realm.user - the user whose credentials are being searched.Stream of credential types.public boolean isConfiguredFor(RealmModel realm, UserModel user, String type)
UserCredentialManagerisConfiguredFor in interface UserCredentialManagerpublic boolean isConfiguredLocally(RealmModel realm, UserModel user, String type)
UserCredentialManagerisConfiguredLocally in interface UserCredentialManagerpublic CredentialValidationOutput authenticate(KeycloakSession session, RealmModel realm, CredentialInput input)
UserCredentialManagerauthenticate in interface UserCredentialManagerpublic void onCache(RealmModel realm, CachedUserModel user, UserModel delegate)
onCache in interface OnUserCachepublic Stream<String> getConfiguredUserStorageCredentialTypesStream(RealmModel realm, UserModel user)
UserCredentialManagergetConfiguredUserStorageCredentialTypesStream in interface UserCredentialManagergetConfiguredUserStorageCredentialTypesStream in interface UserCredentialManager.Streamsrealm - a reference to the realm.user - a reference to the user.Stream of credential types.Copyright © 2021 JBoss by Red Hat. All rights reserved.