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 String
RECOVERY_CODES_GENERATE_NEW_CODES
static String
RECOVERY_CODES_NUMBER_REMAINING
static String
RECOVERY_CODES_NUMBER_USED
static String
TYPE
-
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 boolean
allCodesUsed()
static RecoveryAuthnCodesCredentialModel
createFromCredentialModel(CredentialModel credentialModel)
static RecoveryAuthnCodesCredentialModel
createFromValues(List<String> originalGeneratedCodes, long generatedAt, String userLabel)
Optional<RecoveryAuthnCodeRepresentation>
getNextRecoveryAuthnCode()
void
removeRecoveryAuthnCode()
-
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)
-
-