Class UserMfaTempToken
java.lang.Object
de.xima.fc.entities.UserMfaTempToken
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>, Serializable, Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>
@Entity
public class UserMfaTempToken
extends Object
implements de.xima.cmn.dao.interfaces.IEntity<Long>
Entity representing the temporary token that is needed in conjunction with the two-factor authentication code when
verifying a user via two-factor authentication.
- Since:
- 8.4.0
- Author:
- Norman Lorenz
- See Also:
-
Field Summary
Fields inherited from interface de.xima.cmn.dao.interfaces.IEntity
ATTR_ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintfinal booleangetCode()The two-factor authentication code that is associated with this token.Instant when the token was created.Instant when the token was created.getId()intThe type of two-factor authentication that this token is associated with.getToken()The token value used for two-factor authentication in conjunction with the two-factor authentication code.com.alibaba.fastjson.JSONObjectThe user profile associated with this token.intThe number of attempts made to verify the user with this token.final inthashCode()booleanprotected voidonCreate()Pre persist hook to set the creation date.voidThe two-factor authentication code that is associated with this token.voidsetCreatedAt(Instant createdAt) Instant when the token was created.voidsetExpiresAt(Instant expiresAt) Instant when the token was created.voidvoidsetLockingVersion(int lockingVersion) voidsetMfaType(EMultiFactorAuthenticationType mfaType) The type of two-factor authentication that this token is associated with.voidThe token value used for two-factor authentication in conjunction with the two-factor authentication code.voidsetUniversalReferenceId(String universalReferenceId) voidsetUserData(String userData) voidsetUserDataJson(com.alibaba.fastjson.JSONObject userDataJson) voidsetUserProfile(UserProfile userProfile) The user profile associated with this token.voidsetVerifyAttempts(int verifyAttempts) The number of attempts made to verify the user with this token.toString()
-
Constructor Details
-
UserMfaTempToken
public UserMfaTempToken()
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<de.xima.cmn.dao.interfaces.IEntity<Long>>
-
equals
-
setUserDataJson
public void setUserDataJson(com.alibaba.fastjson.JSONObject userDataJson) -
getUserDataJson
public com.alibaba.fastjson.JSONObject getUserDataJson() -
hashCode
-
isPersisted
public boolean isPersisted()- Specified by:
isPersistedin interfacede.xima.cmn.dao.interfaces.IEntity<Long>
-
onCreate
protected void onCreate()Pre persist hook to set the creation date. -
getId
-
getLockingVersion
public int getLockingVersion() -
getToken
The token value used for two-factor authentication in conjunction with the two-factor authentication code. This token is generated as a UUID and stored as a string. It is unique and immutable once created. -
getCreatedAt
Instant when the token was created. -
getExpiresAt
Instant when the token was created. -
getVerifyAttempts
public int getVerifyAttempts()The number of attempts made to verify the user with this token. -
getUniversalReferenceId
-
getUserData
-
getUserProfile
The user profile associated with this token. -
getMfaType
The type of two-factor authentication that this token is associated with. This is used to determine how the user should authenticate (e.g., via email, TOTP, etc.). -
getCode
-
setId
-
setLockingVersion
public void setLockingVersion(int lockingVersion) -
setToken
The token value used for two-factor authentication in conjunction with the two-factor authentication code. This token is generated as a UUID and stored as a string. It is unique and immutable once created. -
setCreatedAt
Instant when the token was created. -
setExpiresAt
Instant when the token was created. -
setVerifyAttempts
public void setVerifyAttempts(int verifyAttempts) The number of attempts made to verify the user with this token. -
setUniversalReferenceId
-
setUserData
-
setUserProfile
The user profile associated with this token. -
setMfaType
The type of two-factor authentication that this token is associated with. This is used to determine how the user should authenticate (e.g., via email, TOTP, etc.). -
setCode
-
toString
-