public class OTPCredentialProvider extends Object implements CredentialProvider, CredentialInputValidator, CredentialInputUpdater, OnUserCache
| Modifier and Type | Field and Description |
|---|---|
protected KeycloakSession |
session |
| Constructor and Description |
|---|
OTPCredentialProvider(KeycloakSession session) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
configuredForHOTP(RealmModel realm,
UserModel user) |
protected boolean |
configuredForTOTP(RealmModel realm,
UserModel user) |
void |
disableCredentialType(RealmModel realm,
UserModel user,
String credentialType) |
protected List<CredentialModel> |
getCachedCredentials(UserModel user,
String type) |
protected UserCredentialStore |
getCredentialStore() |
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) |
static boolean |
validOTP(RealmModel realm,
String token,
String secret) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcloseprotected KeycloakSession session
public OTPCredentialProvider(KeycloakSession session)
protected List<CredentialModel> getCachedCredentials(UserModel user, String type)
protected UserCredentialStore getCredentialStore()
public void onCache(RealmModel realm, CachedUserModel user, UserModel delegate)
onCache in interface OnUserCachepublic boolean updateCredential(RealmModel realm, UserModel user, CredentialInput input)
updateCredential in interface CredentialInputUpdaterpublic void disableCredentialType(RealmModel realm, UserModel user, String credentialType)
disableCredentialType 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 CredentialInputValidatorprotected boolean configuredForHOTP(RealmModel realm, UserModel user)
protected boolean configuredForTOTP(RealmModel realm, UserModel user)
public static boolean validOTP(RealmModel realm, String token, String secret)
public boolean isValid(RealmModel realm, UserModel user, CredentialInput input)
isValid in interface CredentialInputValidatorCopyright © 2016 JBoss by Red Hat. All rights reserved.