Package org.keycloak.models.credential
Class OTPCredentialModel
- java.lang.Object
- 
- org.keycloak.credential.CredentialModel
- 
- org.keycloak.models.credential.OTPCredentialModel
 
 
- 
- All Implemented Interfaces:
- Serializable
 
 public class OTPCredentialModel extends CredentialModel - See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringHOTPstatic StringTOTPstatic StringTYPE- 
Fields inherited from class org.keycloak.credential.CredentialModelCLIENT_CERT, KERBEROS, OTP, PASSWORD, PASSWORD_HISTORY, PASSWORD_TOKEN, SECRET
 
- 
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OTPCredentialModelcreateFromCredentialModel(CredentialModel credentialModel)static OTPCredentialModelcreateFromPolicy(RealmModel realm, String secretValue)static OTPCredentialModelcreateFromPolicy(RealmModel realm, String secretValue, String userLabel)static OTPCredentialModelcreateHOTP(String secretValue, int digits, int counter, String algorithm)static OTPCredentialModelcreateTOTP(String secretValue, int digits, int period, String algorithm)OTPCredentialDatagetOTPCredentialData()OTPSecretDatagetOTPSecretData()voidupdateCounter(int counter)- 
Methods inherited from class org.keycloak.credential.CredentialModelcomparingByStartDateDesc, 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- 
TYPEpublic static final String TYPE - See Also:
- Constant Field Values
 
 - 
TOTPpublic static final String TOTP - See Also:
- Constant Field Values
 
 - 
HOTPpublic static final String HOTP - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
createTOTPpublic static OTPCredentialModel createTOTP(String secretValue, int digits, int period, String algorithm) 
 - 
createHOTPpublic static OTPCredentialModel createHOTP(String secretValue, int digits, int counter, String algorithm) 
 - 
createFromPolicypublic static OTPCredentialModel createFromPolicy(RealmModel realm, String secretValue) 
 - 
createFromPolicypublic static OTPCredentialModel createFromPolicy(RealmModel realm, String secretValue, String userLabel) 
 - 
createFromCredentialModelpublic static OTPCredentialModel createFromCredentialModel(CredentialModel credentialModel) 
 - 
updateCounterpublic void updateCounter(int counter) 
 - 
getOTPCredentialDatapublic OTPCredentialData getOTPCredentialData() 
 - 
getOTPSecretDatapublic OTPSecretData getOTPSecretData() 
 
- 
 
-