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; null when 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 Details

    • label

      private final String label
      The field for the label record component.
    • createdAt

      private final Instant createdAt
      The field for the createdAt record component.
    • lastUsedAt

      private final Instant lastUsedAt
      The field for the lastUsedAt record component.
    • backedUp

      private final boolean backedUp
      The field for the backedUp record component.
  • Constructor Details

    • PasskeyView

      public PasskeyView(String label, Instant createdAt, Instant lastUsedAt, boolean backedUp)
      Creates an instance of a PasskeyView record class.
      Parameters:
      label - the value for the label record component
      createdAt - the value for the createdAt record component
      lastUsedAt - the value for the lastUsedAt record component
      backedUp - the value for the backedUp record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • label

      public String label()
      Returns the value of the label record component.
      Returns:
      the value of the label record component
    • createdAt

      public Instant createdAt()
      Returns the value of the createdAt record component.
      Returns:
      the value of the createdAt record component
    • lastUsedAt

      public Instant lastUsedAt()
      Returns the value of the lastUsedAt record component.
      Returns:
      the value of the lastUsedAt record component
    • backedUp

      public boolean backedUp()
      Returns the value of the backedUp record component.
      Returns:
      the value of the backedUp record component