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 String
CLIENT_CERT
static String
HOTP
Deprecated.static String
KERBEROS
static String
OTP
Deprecated.static String
PASSWORD
Deprecated.static String
PASSWORD_HISTORY
Deprecated.static String
PASSWORD_TOKEN
Deprecated.static String
SECRET
static String
TOTP
Deprecated.
-
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()
String
getAlgorithm()
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 credentialint
getCounter()
Deprecated.Recommended to use OTPCredentialModel.getOTPCredentialData().getCounter()Long
getCreatedDate()
String
getCredentialData()
String
getDevice()
Deprecated.Recommended to use OTPCredentialModel.getOTPCredentialData().getDevice()int
getDigits()
Deprecated.Recommended to use OTPCredentialModel.getOTPCredentialData().getDigits()int
getHashIterations()
Deprecated.Recommended to use PasswordCredentialModel.getPasswordCredentialData().getHashIterations()String
getId()
int
getPeriod()
Deprecated.Recommended to use OTPCredentialModel.getOTPCredentialData().getPeriod()byte[]
getSalt()
Deprecated.Recommended to use PasswordCredentialModel.getPasswordSecretData().getSalt()String
getSecretData()
String
getType()
String
getUserLabel()
String
getValue()
Deprecated.Recommended to use PasswordCredentialModel.getPasswordSecretData().getValue() or OTPCredentialModel.getOTPSecretData().getValue()void
setAlgorithm(String algorithm)
Deprecated.SeegetAlgorithm()
void
setConfig(MultivaluedHashMap<String,String> config)
Deprecated.Recommended to usesetCredentialData(String)
instead and use the subtype of CredentialData specific to your credentialvoid
setCounter(int counter)
Deprecated.SeegetCounter()
void
setCreatedDate(Long createdDate)
void
setCredentialData(String credentialData)
void
setDevice(String device)
Deprecated.SeegetDevice()
void
setDigits(int digits)
Deprecated.SeesetDigits(int)
void
setHashIterations(int iterations)
Deprecated.void
setId(String id)
void
setPeriod(int period)
Deprecated.SeesetPeriod(int)
void
setSalt(byte[] salt)
Deprecated.SeegetSalt()
void
setSecretData(String secretData)
void
setType(String type)
void
setUserLabel(String userLabel)
void
setValue(String value)
Deprecated.SeegetValue()
CredentialModel
shallowClone()
-
-
-
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
-
-