Package org.keycloak.credential
Class RecoveryAuthnCodesCredentialProvider
- java.lang.Object
-
- org.keycloak.credential.RecoveryAuthnCodesCredentialProvider
-
- All Implemented Interfaces:
CredentialInputValidator
,CredentialProvider<RecoveryAuthnCodesCredentialModel>
,Provider
public class RecoveryAuthnCodesCredentialProvider extends Object implements CredentialProvider<RecoveryAuthnCodesCredentialModel>, CredentialInputValidator
-
-
Constructor Summary
Constructors Constructor Description RecoveryAuthnCodesCredentialProvider(KeycloakSession session)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CredentialModel
createCredential(RealmModel realm, UserModel user, RecoveryAuthnCodesCredentialModel credentialModel)
boolean
deleteCredential(RealmModel realm, UserModel user, String credentialId)
RecoveryAuthnCodesCredentialModel
getCredentialFromModel(CredentialModel model)
CredentialMetadata
getCredentialMetadata(RecoveryAuthnCodesCredentialModel credentialModel, CredentialTypeMetadata credentialTypeMetadata)
CredentialTypeMetadata
getCredentialTypeMetadata(CredentialTypeMetadataContext metadataContext)
String
getType()
protected int
getWarningThreshold()
boolean
isConfiguredFor(RealmModel realm, UserModel user, String credentialType)
boolean
isValid(RealmModel realm, UserModel user, CredentialInput credentialInput)
Tests whether a credential is validboolean
supportsCredentialType(String credentialType)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.keycloak.credential.CredentialProvider
close, getDefaultCredential
-
-
-
-
Constructor Detail
-
RecoveryAuthnCodesCredentialProvider
public RecoveryAuthnCodesCredentialProvider(KeycloakSession session)
-
-
Method Detail
-
getType
public String getType()
- Specified by:
getType
in interfaceCredentialProvider<RecoveryAuthnCodesCredentialModel>
-
createCredential
public CredentialModel createCredential(RealmModel realm, UserModel user, RecoveryAuthnCodesCredentialModel credentialModel)
- Specified by:
createCredential
in interfaceCredentialProvider<RecoveryAuthnCodesCredentialModel>
-
deleteCredential
public boolean deleteCredential(RealmModel realm, UserModel user, String credentialId)
- Specified by:
deleteCredential
in interfaceCredentialProvider<RecoveryAuthnCodesCredentialModel>
-
getCredentialFromModel
public RecoveryAuthnCodesCredentialModel getCredentialFromModel(CredentialModel model)
- Specified by:
getCredentialFromModel
in interfaceCredentialProvider<RecoveryAuthnCodesCredentialModel>
-
getCredentialTypeMetadata
public CredentialTypeMetadata getCredentialTypeMetadata(CredentialTypeMetadataContext metadataContext)
- Specified by:
getCredentialTypeMetadata
in interfaceCredentialProvider<RecoveryAuthnCodesCredentialModel>
-
getCredentialMetadata
public CredentialMetadata getCredentialMetadata(RecoveryAuthnCodesCredentialModel credentialModel, CredentialTypeMetadata credentialTypeMetadata)
- Specified by:
getCredentialMetadata
in interfaceCredentialProvider<RecoveryAuthnCodesCredentialModel>
-
supportsCredentialType
public boolean supportsCredentialType(String credentialType)
- Specified by:
supportsCredentialType
in interfaceCredentialInputValidator
-
isConfiguredFor
public boolean isConfiguredFor(RealmModel realm, UserModel user, String credentialType)
- Specified by:
isConfiguredFor
in interfaceCredentialInputValidator
-
isValid
public boolean isValid(RealmModel realm, UserModel user, CredentialInput credentialInput)
Description copied from interface:CredentialInputValidator
Tests whether a credential is valid- Specified by:
isValid
in interfaceCredentialInputValidator
- Parameters:
realm
- The realm in which to which the credential belongs touser
- The user for which to test the credentialcredentialInput
- the credential details to verify- Returns:
- true if the passed secret is correct
-
getWarningThreshold
protected int getWarningThreshold()
-
-