Package org.keycloak.models.credential
Class RecoveryAuthnCodesCredentialModel
- java.lang.Object
-
- org.keycloak.credential.CredentialModel
-
- org.keycloak.models.credential.RecoveryAuthnCodesCredentialModel
-
- All Implemented Interfaces:
Serializable
public class RecoveryAuthnCodesCredentialModel extends CredentialModel
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringRECOVERY_CODES_GENERATE_NEW_CODESstatic StringRECOVERY_CODES_NUMBER_REMAININGstatic StringRECOVERY_CODES_NUMBER_USEDstatic StringTYPE-
Fields inherited from class org.keycloak.credential.CredentialModel
CLIENT_CERT, HOTP, KERBEROS, OTP, PASSWORD, PASSWORD_HISTORY, PASSWORD_TOKEN, SECRET, TOTP
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallCodesUsed()static RecoveryAuthnCodesCredentialModelcreateFromCredentialModel(CredentialModel credentialModel)static RecoveryAuthnCodesCredentialModelcreateFromValues(List<String> originalGeneratedCodes, long generatedAt, String userLabel)Optional<RecoveryAuthnCodeRepresentation>getNextRecoveryAuthnCode()voidremoveRecoveryAuthnCode()-
Methods inherited from class org.keycloak.credential.CredentialModel
comparingByStartDateDesc, getAlgorithm, getConfig, getCounter, getCreatedDate, getCredentialData, getDevice, getDigits, getHashIterations, getId, getPeriod, getSalt, getSecretData, getType, getUserLabel, getValue, setAlgorithm, setConfig, setCounter, setCreatedDate, setCredentialData, setDevice, setDigits, setHashIterations, setId, setPeriod, setSalt, setSecretData, setType, setUserLabel, setValue, shallowClone
-
-
-
-
Field Detail
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
RECOVERY_CODES_NUMBER_USED
public static final String RECOVERY_CODES_NUMBER_USED
- See Also:
- Constant Field Values
-
RECOVERY_CODES_NUMBER_REMAINING
public static final String RECOVERY_CODES_NUMBER_REMAINING
- See Also:
- Constant Field Values
-
RECOVERY_CODES_GENERATE_NEW_CODES
public static final String RECOVERY_CODES_GENERATE_NEW_CODES
- See Also:
- Constant Field Values
-
-
Method Detail
-
getNextRecoveryAuthnCode
public Optional<RecoveryAuthnCodeRepresentation> getNextRecoveryAuthnCode()
-
allCodesUsed
public boolean allCodesUsed()
-
removeRecoveryAuthnCode
public void removeRecoveryAuthnCode()
-
createFromValues
public static RecoveryAuthnCodesCredentialModel createFromValues(List<String> originalGeneratedCodes, long generatedAt, String userLabel)
-
createFromCredentialModel
public static RecoveryAuthnCodesCredentialModel createFromCredentialModel(CredentialModel credentialModel)
-
-