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 (defaultIrurueta 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 Summary
FieldsModifier and TypeFieldDescriptionThe field for theallowedOriginsrecord component.private final StringThe field for therpIdrecord component.private final StringThe field for therpNamerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPasskeyProperties(String rpName, String rpId, List<String> allowedOrigins) Validates the settings and copies the origins. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theallowedOriginsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.rpId()Returns the value of therpIdrecord component.rpName()Returns the value of therpNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
rpName
The field for therpNamerecord component. -
rpId
The field for therpIdrecord component. -
allowedOrigins
The field for theallowedOriginsrecord 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
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. All components in this record class are compared withObjects::equals(Object,Object). -
rpName
Returns the value of therpNamerecord component.- Returns:
- the value of the
rpNamerecord component
-
rpId
Returns the value of therpIdrecord component.- Returns:
- the value of the
rpIdrecord component
-
allowedOrigins
Returns the value of theallowedOriginsrecord component.- Returns:
- the value of the
allowedOriginsrecord component
-