Package org.keycloak.credential
Class CredentialModel
- java.lang.Object
-
- org.keycloak.credential.CredentialModel
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
OTPCredentialModel,PasswordCredentialModel,RecoveryAuthnCodesCredentialModel,WebAuthnCredentialModel
public class CredentialModel extends Object implements Serializable
Used just in cases when we want to "directly" update or retrieve the hash or salt of user credential (For example during export/import)- Author:
- Marek Posolda
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringCLIENT_CERTstatic StringHOTPDeprecated.static StringKERBEROSstatic StringOTPDeprecated.static StringPASSWORDDeprecated.static StringPASSWORD_HISTORYDeprecated.static StringPASSWORD_TOKENDeprecated.static StringSECRETstatic StringTOTPDeprecated.
-
Constructor Summary
Constructors Constructor Description CredentialModel()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Comparator<CredentialModel>comparingByStartDateDesc()StringgetAlgorithm()Deprecated.Recommended to use PasswordCredentialModel.getPasswordCredentialData().getAlgorithm() or OTPCredentialModel.getOTPCredentialData().getAlgorithm()MultivaluedHashMap<String,String>getConfig()Deprecated.Recommended to usegetCredentialData()instead and use the subtype of CredentialData specific to your credentialintgetCounter()Deprecated.Recommended to use OTPCredentialModel.getOTPCredentialData().getCounter()LonggetCreatedDate()StringgetCredentialData()StringgetDevice()Deprecated.Recommended to use OTPCredentialModel.getOTPCredentialData().getDevice()intgetDigits()Deprecated.Recommended to use OTPCredentialModel.getOTPCredentialData().getDigits()intgetHashIterations()Deprecated.Recommended to use PasswordCredentialModel.getPasswordCredentialData().getHashIterations()StringgetId()intgetPeriod()Deprecated.Recommended to use OTPCredentialModel.getOTPCredentialData().getPeriod()byte[]getSalt()Deprecated.Recommended to use PasswordCredentialModel.getPasswordSecretData().getSalt()StringgetSecretData()StringgetType()StringgetUserLabel()StringgetValue()Deprecated.Recommended to use PasswordCredentialModel.getPasswordSecretData().getValue() or OTPCredentialModel.getOTPSecretData().getValue()voidsetAlgorithm(String algorithm)Deprecated.SeegetAlgorithm()voidsetConfig(MultivaluedHashMap<String,String> config)Deprecated.Recommended to usesetCredentialData(String)instead and use the subtype of CredentialData specific to your credentialvoidsetCounter(int counter)Deprecated.SeegetCounter()voidsetCreatedDate(Long createdDate)voidsetCredentialData(String credentialData)voidsetDevice(String device)Deprecated.SeegetDevice()voidsetDigits(int digits)Deprecated.SeesetDigits(int)voidsetHashIterations(int iterations)Deprecated.voidsetId(String id)voidsetPeriod(int period)Deprecated.SeesetPeriod(int)voidsetSalt(byte[] salt)Deprecated.SeegetSalt()voidsetSecretData(String secretData)voidsetType(String type)voidsetUserLabel(String userLabel)voidsetValue(String value)Deprecated.SeegetValue()CredentialModelshallowClone()
-
-
-
Field Detail
-
PASSWORD
@Deprecated public static final String PASSWORD
Deprecated.- See Also:
- Constant Field Values
-
PASSWORD_HISTORY
@Deprecated public static final String PASSWORD_HISTORY
Deprecated.- See Also:
- Constant Field Values
-
PASSWORD_TOKEN
@Deprecated public static final String PASSWORD_TOKEN
Deprecated.- See Also:
- Constant Field Values
-
OTP
@Deprecated public static final String OTP
Deprecated.- See Also:
- Constant Field Values
-
TOTP
@Deprecated public static final String TOTP
Deprecated.- See Also:
- Constant Field Values
-
HOTP
@Deprecated public static final String HOTP
Deprecated.- See Also:
- Constant Field Values
-
SECRET
public static final String SECRET
- See Also:
- Constant Field Values
-
CLIENT_CERT
public static final String CLIENT_CERT
- See Also:
- Constant Field Values
-
KERBEROS
public static final String KERBEROS
- See Also:
- Constant Field Values
-
-
Method Detail
-
shallowClone
public CredentialModel shallowClone()
-
getId
public String getId()
-
setId
public void setId(String id)
-
getType
public String getType()
-
setType
public void setType(String type)
-
getUserLabel
public String getUserLabel()
-
setUserLabel
public void setUserLabel(String userLabel)
-
getCreatedDate
public Long getCreatedDate()
-
setCreatedDate
public void setCreatedDate(Long createdDate)
-
getSecretData
public String getSecretData()
-
setSecretData
public void setSecretData(String secretData)
-
getCredentialData
public String getCredentialData()
-
setCredentialData
public void setCredentialData(String credentialData)
-
comparingByStartDateDesc
public static Comparator<CredentialModel> comparingByStartDateDesc()
-
getValue
@Deprecated public String getValue()
Deprecated.Recommended to use PasswordCredentialModel.getPasswordSecretData().getValue() or OTPCredentialModel.getOTPSecretData().getValue()
-
setValue
@Deprecated public void setValue(String value)
Deprecated.SeegetValue()
-
getDevice
@Deprecated public String getDevice()
Deprecated.Recommended to use OTPCredentialModel.getOTPCredentialData().getDevice()
-
setDevice
@Deprecated public void setDevice(String device)
Deprecated.SeegetDevice()
-
getSalt
@Deprecated public byte[] getSalt()
Deprecated.Recommended to use PasswordCredentialModel.getPasswordSecretData().getSalt()
-
setSalt
@Deprecated public void setSalt(byte[] salt)
Deprecated.SeegetSalt()
-
getHashIterations
@Deprecated public int getHashIterations()
Deprecated.Recommended to use PasswordCredentialModel.getPasswordCredentialData().getHashIterations()
-
setHashIterations
@Deprecated public void setHashIterations(int iterations)
Deprecated.
-
getCounter
@Deprecated public int getCounter()
Deprecated.Recommended to use OTPCredentialModel.getOTPCredentialData().getCounter()
-
setCounter
@Deprecated public void setCounter(int counter)
Deprecated.SeegetCounter()
-
getAlgorithm
@Deprecated public String getAlgorithm()
Deprecated.Recommended to use PasswordCredentialModel.getPasswordCredentialData().getAlgorithm() or OTPCredentialModel.getOTPCredentialData().getAlgorithm()
-
setAlgorithm
@Deprecated public void setAlgorithm(String algorithm)
Deprecated.SeegetAlgorithm()
-
getDigits
@Deprecated public int getDigits()
Deprecated.Recommended to use OTPCredentialModel.getOTPCredentialData().getDigits()
-
setDigits
@Deprecated public void setDigits(int digits)
Deprecated.SeesetDigits(int)
-
getPeriod
@Deprecated public int getPeriod()
Deprecated.Recommended to use OTPCredentialModel.getOTPCredentialData().getPeriod()
-
setPeriod
@Deprecated public void setPeriod(int period)
Deprecated.SeesetPeriod(int)
-
getConfig
@Deprecated public MultivaluedHashMap<String,String> getConfig()
Deprecated.Recommended to usegetCredentialData()instead and use the subtype of CredentialData specific to your credential
-
setConfig
@Deprecated public void setConfig(MultivaluedHashMap<String,String> config)
Deprecated.Recommended to usesetCredentialData(String)instead and use the subtype of CredentialData specific to your credential
-
-