Record Class PasskeyView
java.lang.Object
java.lang.Record
com.irurueta.authserver.authorization.api.web.passkeys.PasskeyView
- Record Components:
label- name that identifies the passkey.createdAt- when it was registered.lastUsedAt- when it last signed in;nullwhen it never did.backedUp- whether the credential is synchronised between devices.
public record PasskeyView(String label, Instant createdAt, Instant lastUsedAt, boolean backedUp)
extends Record
What the passkeys page shows of a passkey. It is a view model of the page, never a domain object or a DTO of the
REST contract.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for thebackedUprecord component.private final InstantThe field for thecreatedAtrecord component.private final StringThe field for thelabelrecord component.private final InstantThe field for thelastUsedAtrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPasskeyView(String label, Instant createdAt, Instant lastUsedAt, boolean backedUp) Creates an instance of aPasskeyViewrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbackedUp()Returns the value of thebackedUprecord component.Returns the value of thecreatedAtrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.label()Returns the value of thelabelrecord component.Returns the value of thelastUsedAtrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
label
The field for thelabelrecord component. -
createdAt
The field for thecreatedAtrecord component. -
lastUsedAt
The field for thelastUsedAtrecord component. -
backedUp
private final boolean backedUpThe field for thebackedUprecord component.
-
-
Constructor Details
-
PasskeyView
Creates an instance of aPasskeyViewrecord class.- Parameters:
label- the value for thelabelrecord componentcreatedAt- the value for thecreatedAtrecord componentlastUsedAt- the value for thelastUsedAtrecord componentbackedUp- the value for thebackedUprecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
createdAt
Returns the value of thecreatedAtrecord component.- Returns:
- the value of the
createdAtrecord component
-
lastUsedAt
Returns the value of thelastUsedAtrecord component.- Returns:
- the value of the
lastUsedAtrecord component
-
backedUp
public boolean backedUp()Returns the value of thebackedUprecord component.- Returns:
- the value of the
backedUprecord component
-