Record Class PasskeyProperties

java.lang.Object
java.lang.Record
com.irurueta.authserver.authorization.application.passkeys.PasskeyProperties
Record Components:
rpName - name of the relying party shown by the authenticator (default Irurueta Auth Server).
rpId - relying party id: the host name credentials are scoped to.
allowedOrigins - origins (scheme, host and port) the browser may run the WebAuthn ceremonies from.

@ConfigurationProperties("authserver.passkeys") public record PasskeyProperties(String rpName, String rpId, List<String> allowedOrigins) extends Record
Relying party settings of the passkeys (WebAuthn), bound once from authserver.passkeys.* and injected wherever one of them is needed. An invalid value stops the application at startup. A browser only accepts a credential whose relying party id is the host of the page (or a registrable suffix of it) and whose origin is one of the allowed ones, so a deployment must set rp-id and allowed-origins to its public host name; the shipped application.yml defaults to localhost for local runs only.
  • Field Details

    • rpName

      private final String rpName
      The field for the rpName record component.
    • rpId

      private final String rpId
      The field for the rpId record component.
    • allowedOrigins

      private final List<String> allowedOrigins
      The field for the allowedOrigins record component.
  • Constructor Details

    • PasskeyProperties

      public PasskeyProperties(@DefaultValue("Irurueta Auth Server") String rpName, String rpId, List<String> allowedOrigins)
      Validates the settings and copies the origins.
      Throws:
      IllegalArgumentException - if the name or the id is blank, or there is no allowed origin or one is blank.
  • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • rpName

      public String rpName()
      Returns the value of the rpName record component.
      Returns:
      the value of the rpName record component
    • rpId

      public String rpId()
      Returns the value of the rpId record component.
      Returns:
      the value of the rpId record component
    • allowedOrigins

      public List<String> allowedOrigins()
      Returns the value of the allowedOrigins record component.
      Returns:
      the value of the allowedOrigins record component