Record Class MFAStore.Row
java.lang.Object
java.lang.Record
com.iizix.server.user.mfa.MFAStore.Row
- Record Components:
uid- The user ID.method- The method of the factor,totp;passkeyfor a user whose second factor is a passkey and no authenticator app (CC-FIX-SIGNIN-2FA-CHOICE): the row then holds no secret, and is what tells that the user has a second factor, with its recovery codes and its count of invalid codes.sealedSecret- The shared secret, sealed: never the clear secret.algorithm- The hashing algorithm the app was enrolled with.digits- The number of digits of a code.period- The time in seconds a code is valid.created- The time the enrolment was confirmed, milliseconds since the epoch.lastStep- The time step of the last accepted code.lastUsed- The time a code was last accepted, zero for never.lastFail- The time of the last invalid code, zero for none.failCount- The invalid codes since the last accepted one.issuer- The issuer of the entry the authenticator app shows, as the enrolment's QR code carried it (CC-FIX-SIGNIN-RECOVERY); null for an enrolment made before it was stored, and for a passkey row.account- The account of that entry, the user name at the enrolment; null as the issuer.
- Enclosing class:
MFAStore
public static record MFAStore.Row(long uid, String method, String sealedSecret, String algorithm, int digits, int period, long created, long lastStep, long lastUsed, long lastFail, int failCount, String issuer, String account) extends Record
The second factor of a user, as stored.
- Author:
- Christopher Mindus
Constructor Summary
ConstructorsConstructorDescriptionRow(long uid, String method, String sealedSecret, String algorithm, int digits, int period, long created, long lastStep, long lastUsed, long lastFail, int failCount) A row without the names of the entry: an enrolment made before CC-FIX-SIGNIN-RECOVERY stored none, and a passkey row has no entry.Row(long uid, String method, String sealedSecret, String algorithm, int digits, int period, long created, long lastStep, long lastUsed, long lastFail, int failCount, String issuer, String account) Creates an instance of aRowrecord class.Method Summary
Modifier and TypeMethodDescriptionaccount()Returns the value of theaccountrecord component.Returns the value of thealgorithmrecord component.longcreated()Returns the value of thecreatedrecord component.intdigits()Returns the value of thedigitsrecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefailCountrecord component.final inthashCode()Returns a hash code value for this object.issuer()Returns the value of theissuerrecord component.longlastFail()Returns the value of thelastFailrecord component.longlastStep()Returns the value of thelastSteprecord component.longlastUsed()Returns the value of thelastUsedrecord component.method()Returns the value of themethodrecord component.intperiod()Returns the value of theperiodrecord component.Returns the value of thesealedSecretrecord component.toString()Gets the row without its sealed secret, for a log or a debugger.longuid()Returns the value of theuidrecord component.
Constructor Details
Row
public Row(long uid, String method, String sealedSecret, String algorithm, int digits, int period, long created, long lastStep, long lastUsed, long lastFail, int failCount) A row without the names of the entry: an enrolment made before CC-FIX-SIGNIN-RECOVERY stored none, and a passkey row has no entry.- Parameters:
uid- The user ID.method- The method of the factor.sealedSecret- The shared secret, sealed.algorithm- The hashing algorithm.digits- The number of digits of a code.period- The time in seconds a code is valid.created- The time the enrolment was confirmed.lastStep- The time step of the last accepted code.lastUsed- The time a code was last accepted, zero for never.lastFail- The time of the last invalid code, zero for none.failCount- The invalid codes since the last accepted one.
Row
public Row(long uid, String method, String sealedSecret, String algorithm, int digits, int period, long created, long lastStep, long lastUsed, long lastFail, int failCount, String issuer, String account) Creates an instance of aRowrecord class.- Parameters:
uid- the value for theuidrecord componentmethod- the value for themethodrecord componentsealedSecret- the value for thesealedSecretrecord componentalgorithm- the value for thealgorithmrecord componentdigits- the value for thedigitsrecord componentperiod- the value for theperiodrecord componentcreated- the value for thecreatedrecord componentlastStep- the value for thelastSteprecord componentlastUsed- the value for thelastUsedrecord componentlastFail- the value for thelastFailrecord componentfailCount- the value for thefailCountrecord componentissuer- the value for theissuerrecord componentaccount- the value for theaccountrecord component
Method Details
toString
hashCode
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes.uid
method
sealedSecret
Returns the value of thesealedSecretrecord component.- Returns:
- the value of the
sealedSecretrecord component
algorithm
digits
period
created
lastStep
lastUsed
lastFail
failCount
issuer
account