Package org.keycloak.models
Class UserCredentialModel
- java.lang.Object
- 
- org.keycloak.models.UserCredentialModel
 
- 
- All Implemented Interfaces:
- CredentialInput
 - Direct Known Subclasses:
- PasswordUserCredentialModel
 
 public class UserCredentialModel extends Object implements CredentialInput - Version:
- $Revision: 1 $
- Author:
- Bill Burke
 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringCLIENT_CERTstatic StringHOTPDeprecated.static StringKERBEROSprotected Map<String,Object>notesstatic StringPASSWORDDeprecated.static StringPASSWORD_HISTORYDeprecated.static StringPASSWORD_TOKENDeprecated.static StringSECRETstatic StringTOTPDeprecated.
 - 
Constructor SummaryConstructors Constructor Description UserCredentialModel()UserCredentialModel(String credentialId, String type, String challengeResponse)UserCredentialModel(String credentialId, String type, String challengeResponse, boolean adminRequest)
 - 
Method Summary
 
- 
- 
- 
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
 
 - 
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
 
 - 
PASSWORD_TOKEN@Deprecated public static final String PASSWORD_TOKEN Deprecated.- See Also:
- Constant Field Values
 
 - 
SECRETpublic static final String SECRET - See Also:
- Constant Field Values
 
 - 
KERBEROSpublic static final String KERBEROS - See Also:
- Constant Field Values
 
 - 
CLIENT_CERTpublic static final String CLIENT_CERT - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
passwordpublic static PasswordUserCredentialModel password(String password) 
 - 
passwordpublic static PasswordUserCredentialModel password(String password, boolean adminRequest) 
 - 
passwordToken@Deprecated public static UserCredentialModel passwordToken(String passwordToken) Deprecated.
 - 
otppublic static UserCredentialModel otp(String type, String key) - Parameters:
- type- must be "totp" or "hotp"
- key-
- Returns:
 
 - 
totppublic static UserCredentialModel totp(String key) 
 - 
hotppublic static UserCredentialModel hotp(String key) 
 - 
secretpublic static UserCredentialModel secret(String password) 
 - 
kerberospublic static UserCredentialModel kerberos(String token) 
 - 
generateSecretpublic static UserCredentialModel generateSecret() 
 - 
buildFromBackupAuthnCodepublic static UserCredentialModel buildFromBackupAuthnCode(String backupAuthnCodeInput) 
 - 
buildFromBackupAuthnCodepublic static UserCredentialModel buildFromBackupAuthnCode(String credentialId, String backupAuthnCodeInput) 
 - 
getCredentialIdpublic String getCredentialId() - Specified by:
- getCredentialIdin interface- CredentialInput
 
 - 
getTypepublic String getType() - Specified by:
- getTypein interface- CredentialInput
 
 - 
setTypepublic void setType(String type) 
 - 
getChallengeResponsepublic String getChallengeResponse() - Specified by:
- getChallengeResponsein interface- CredentialInput
 
 - 
isAdminRequestpublic boolean isAdminRequest() 
 - 
isOtp@Deprecated public static boolean isOtp(String type) Deprecated.This method exists only because of the backwards compatibility
 - 
getValuepublic String getValue() This method exists only because of the backwards compatibility. It is recommended to usegetChallengeResponse()instead
 - 
setValuepublic void setValue(String value) 
 - 
getDevicepublic String getDevice() 
 - 
setDevicepublic void setDevice(String device) 
 - 
getAlgorithmpublic String getAlgorithm() 
 - 
setAlgorithmpublic void setAlgorithm(String algorithm) 
 - 
removeNotepublic void removeNote(String key) 
 
- 
 
-