public class PasswordCredentialProvider extends Object implements CredentialProvider, CredentialInputValidator, CredentialInputUpdater, OnUserCache
| Modifier and Type | Field and Description |
|---|---|
static String |
PASSWORD_CACHE_KEY |
protected KeycloakSession |
session |
| Constructor and Description |
|---|
PasswordCredentialProvider(KeycloakSession session) |
| Modifier and Type | Method and Description |
|---|---|
void |
disableCredentialType(RealmModel realm,
UserModel user,
String credentialType) |
protected void |
expirePassword(RealmModel realm,
UserModel user,
PasswordPolicy policy) |
protected UserCredentialStore |
getCredentialStore() |
Set<String> |
getDisableableCredentialTypes(RealmModel realm,
UserModel user) |
protected PasswordHashProvider |
getHashProvider(PasswordPolicy policy) |
CredentialModel |
getPassword(RealmModel realm,
UserModel user) |
boolean |
isConfiguredFor(RealmModel realm,
UserModel user,
String credentialType) |
boolean |
isValid(RealmModel realm,
UserModel user,
CredentialInput input) |
void |
onCache(RealmModel realm,
CachedUserModel user,
UserModel delegate) |
boolean |
supportsCredentialType(String credentialType) |
boolean |
updateCredential(RealmModel realm,
UserModel user,
CredentialInput input) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclosepublic static final String PASSWORD_CACHE_KEY
protected KeycloakSession session
public PasswordCredentialProvider(KeycloakSession session)
protected UserCredentialStore getCredentialStore()
public CredentialModel getPassword(RealmModel realm, UserModel user)
public boolean updateCredential(RealmModel realm, UserModel user, CredentialInput input)
updateCredential in interface CredentialInputUpdaterprotected void expirePassword(RealmModel realm, UserModel user, PasswordPolicy policy)
protected PasswordHashProvider getHashProvider(PasswordPolicy policy)
public void disableCredentialType(RealmModel realm, UserModel user, String credentialType)
disableCredentialType in interface CredentialInputUpdaterpublic Set<String> getDisableableCredentialTypes(RealmModel realm, UserModel user)
getDisableableCredentialTypes in interface CredentialInputUpdaterpublic boolean supportsCredentialType(String credentialType)
supportsCredentialType in interface CredentialInputUpdatersupportsCredentialType in interface CredentialInputValidatorpublic boolean isConfiguredFor(RealmModel realm, UserModel user, String credentialType)
isConfiguredFor in interface CredentialInputValidatorpublic boolean isValid(RealmModel realm, UserModel user, CredentialInput input)
isValid in interface CredentialInputValidatorpublic void onCache(RealmModel realm, CachedUserModel user, UserModel delegate)
onCache in interface OnUserCacheCopyright © 2018 JBoss by Red Hat. All rights reserved.