Record Class DeviceTokenStore.Redeemed
java.lang.Object
java.lang.Record
com.iizix.server.user.DeviceTokenStore.Redeemed
- Record Components:
status- What the token is; everything below is set forDeviceTokenStore.Status.OKonly.uid- The user of the row.deviceID- The device identifier of the row.token- The token that replaces the presented one, for the device; null when the token was only looked at (DeviceTokenStore.peek(String, String, String)).expires- When the row expires unless used, in epoch milliseconds.staySignedIn- Whether the token is one to sign in with.mfaTrustedUntil- Until when the device is trusted for MFA, zero for not.
- Enclosing class:
DeviceTokenStore
public static record DeviceTokenStore.Redeemed(DeviceTokenStore.Status status, long uid, String deviceID, String token, long expires, boolean staySignedIn, long mfaTrustedUntil) extends Record
What became of a presented token.
- Author:
- Christopher Mindus
Constructor Summary
ConstructorsConstructorDescriptionRedeemed(DeviceTokenStore.Status status, long uid, String deviceID, String token, long expires, boolean staySignedIn, long mfaTrustedUntil) Creates an instance of aRedeemedrecord class.Method Summary
Modifier and TypeMethodDescriptiondeviceID()Returns the value of thedeviceIDrecord component.final booleanIndicates whether some other object is "equal to" this one.longexpires()Returns the value of theexpiresrecord component.final inthashCode()Returns a hash code value for this object.booleanTells whether the token was accepted.longReturns the value of themfaTrustedUntilrecord component.status()Returns the value of thestatusrecord component.booleanReturns the value of thestaySignedInrecord component.token()Returns the value of thetokenrecord component.toString()Describes this instance without its token.longuid()Returns the value of theuidrecord component.
Constructor Details
Redeemed
public Redeemed(DeviceTokenStore.Status status, long uid, String deviceID, String token, long expires, boolean staySignedIn, long mfaTrustedUntil) Creates an instance of aRedeemedrecord class.- Parameters:
status- the value for thestatusrecord componentuid- the value for theuidrecord componentdeviceID- the value for thedeviceIDrecord componenttoken- the value for thetokenrecord componentexpires- the value for theexpiresrecord componentstaySignedIn- the value for thestaySignedInrecord componentmfaTrustedUntil- the value for themfaTrustedUntilrecord component
Method Details
isAccepted
public boolean isAccepted()Tells whether the token was accepted.- Returns:
- true for
DeviceTokenStore.Status.OK.
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.status
uid
deviceID
token
expires
staySignedIn
public boolean staySignedIn()Returns the value of thestaySignedInrecord component.- Returns:
- the value of the
staySignedInrecord component
mfaTrustedUntil
public long mfaTrustedUntil()Returns the value of themfaTrustedUntilrecord component.- Returns:
- the value of the
mfaTrustedUntilrecord component