Package de.xima.fc.entities
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UserMfaTempToken()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(de.xima.cmn.dao.interfaces.IEntity<Long> o)booleanequals(Object o)StringgetCode()The two-factor authentication code that is associated with this token.InstantgetCreatedAt()Instant when the token was created.InstantgetExpiresAt()Instant when the token was created.LonggetId()intgetLockingVersion()EMultiFactorAuthenticationTypegetMfaType()The type of two-factor authentication that this token is associated with.StringgetToken()The token value used for two-factor authentication in conjunction with the two-factor authentication code.StringgetUniversalReferenceId()StringgetUserData()com.alibaba.fastjson.JSONObjectgetUserDataJson()UserProfilegetUserProfile()The user profile associated with this token.intgetVerifyAttempts()The number of attempts made to verify the user with this token.inthashCode()booleanisPersisted()protected voidonCreate()Pre persist hook to set the creation date.voidsetCode(String code)The 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.voidsetId(Long id)voidsetLockingVersion(int lockingVersion)voidsetMfaType(EMultiFactorAuthenticationType mfaType)The type of two-factor authentication that this token is associated with.voidsetToken(String token)The 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.StringtoString()
-
-
-
Method Detail
-
compareTo
public int compareTo(de.xima.cmn.dao.interfaces.IEntity<Long> o)
- Specified by:
compareToin interfaceComparable<de.xima.cmn.dao.interfaces.IEntity<Long>>
-
setUserDataJson
public void setUserDataJson(com.alibaba.fastjson.JSONObject userDataJson)
-
getUserDataJson
public com.alibaba.fastjson.JSONObject getUserDataJson()
-
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.
-
getLockingVersion
public int getLockingVersion()
-
getToken
public String 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
public Instant getCreatedAt()
Instant when the token was created.
-
getExpiresAt
public Instant getExpiresAt()
Instant when the token was created.
-
getVerifyAttempts
public int getVerifyAttempts()
The number of attempts made to verify the user with this token.
-
getUniversalReferenceId
public String getUniversalReferenceId()
-
getUserData
public String getUserData()
-
getUserProfile
public UserProfile getUserProfile()
The user profile associated with this token.
-
getMfaType
public EMultiFactorAuthenticationType 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
public String getCode()
-
setId
public void setId(Long id)
- Specified by:
setIdin interfacede.xima.cmn.dao.interfaces.IEntity<Long>
-
setLockingVersion
public void setLockingVersion(int lockingVersion)
-
setToken
public void setToken(String token)
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
public void setCreatedAt(Instant createdAt)
Instant when the token was created.
-
setExpiresAt
public void setExpiresAt(Instant expiresAt)
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
public void setUniversalReferenceId(String universalReferenceId)
-
setUserData
public void setUserData(String userData)
-
setUserProfile
public void setUserProfile(UserProfile userProfile)
The user profile associated with this token.
-
setMfaType
public void setMfaType(EMultiFactorAuthenticationType mfaType)
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
public void setCode(String code)
-
-