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
-
Method Summary
Modifier and TypeMethodDescriptioncreateCredential
(RealmModel realm, UserModel user, RecoveryAuthnCodesCredentialModel credentialModel) boolean
deleteCredential
(RealmModel realm, UserModel user, String credentialId) getCredentialMetadata
(RecoveryAuthnCodesCredentialModel credentialModel, CredentialTypeMetadata credentialTypeMetadata) getCredentialTypeMetadata
(CredentialTypeMetadataContext metadataContext) getType()
protected int
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 Details
-
RecoveryAuthnCodesCredentialProvider
-
-
Method Details
-
getType
- Specified by:
getType
in interfaceCredentialProvider<RecoveryAuthnCodesCredentialModel>
-
createCredential
public CredentialModel createCredential(RealmModel realm, UserModel user, RecoveryAuthnCodesCredentialModel credentialModel) - Specified by:
createCredential
in interfaceCredentialProvider<RecoveryAuthnCodesCredentialModel>
-
deleteCredential
- Specified by:
deleteCredential
in interfaceCredentialProvider<RecoveryAuthnCodesCredentialModel>
-
getCredentialFromModel
- 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
- Specified by:
supportsCredentialType
in interfaceCredentialInputValidator
-
isConfiguredFor
- Specified by:
isConfiguredFor
in interfaceCredentialInputValidator
-
isValid
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()
-