Class WebAuthnCredential.Builder

java.lang.Object
net.shibboleth.idp.plugin.authn.duo.model.WebAuthnCredential.Builder
Enclosing class:
WebAuthnCredential

public static final class WebAuthnCredential.Builder extends Object
Builder for this class.
  • Field Details

    • credentialName

      private String credentialName
      Free-form label for the WebAuthn credential.
    • dateAdded

      private Integer dateAdded
      The date the WebAuthn credential was registered in Duo.
    • dateLastUsed

      private Integer dateLastUsed
      The date the WebAuthn credential was last used.
    • label

      private String label
      Indicates the type of WebAuthn credential.
    • webauthnkey

      private String webauthnkey
      The WebAuthn credential's registration identifier.
    • uvCapable

      private Boolean uvCapable
      Is the WebAuthn authenticator associated with this credential capable of identifying a user via a suitable authorization gesture (User Verification).
    • passwordlessAuthorized

      private Boolean passwordlessAuthorized
      If true, this credential can be used for both MFA and Passwordless authentication. If false, this credential can only be used for MFA authentication.
    • backupEligible

      private Boolean backupEligible
      If true, this credential can be used from multiple devices. If false, this credential can only be used on one device.
    • backupStatus

      private Boolean backupStatus
      If true, this credential has been backed up and can be used from multiple devices. If false, this credential has not been backed up.
    • aaguid

      private String aaguid
      A unique identifier that conveys the authenticator's make and model, or the passkey's provider identity. This value cannot be verified as accurate by Duo.
    • registeredAs

      private String registeredAs
      The registration flow that was used to register this WebAuthn credential. One of platform, cross-platform, or unknown.
    • transports

      private List<String> transports
      The transports the authenticator can use to communicate with a client.
    • additionalProperties

      @Nonnull private final Map<String,Object> additionalProperties
      Any additional properties not explicitly captured by this class are added to this map.
  • Constructor Details

    • Builder

      private Builder()
      Constructor.
  • Method Details

    • withCredentialName

      public WebAuthnCredential.Builder withCredentialName(@Nullable String name)
      Build the credential name
      Parameters:
      name - the credential name
      Returns:
      this
    • withDateAdded

      public WebAuthnCredential.Builder withDateAdded(@Nullable Integer date)
      Build the date the WebAuthn credential was last used
      Parameters:
      date - the date added
      Returns:
      this
    • withLabel

      public WebAuthnCredential.Builder withLabel(@Nullable String labelIn)
      Build the type of WebAuthn credential.
      Parameters:
      labelIn - the label
      Returns:
      this
    • withWebauthnkey

      public WebAuthnCredential.Builder withWebauthnkey(@Nullable String key)
      Build the WebAuthn credential's registration identifier.
      Parameters:
      key - the webauthnkey
      Returns:
      this
    • withUvCapable

      public WebAuthnCredential.Builder withUvCapable(@Nullable Boolean flag)
      Build if the WebAuthn authenticator associated with this credential is capable of identifying a user via a suitable authorization gesture.
      Parameters:
      flag - the uv_capable flag
      Returns:
      this
    • withPasswordlessAuthorized

      public WebAuthnCredential.Builder withPasswordlessAuthorized(@Nullable Boolean flag)
      Build if this credential can be used for both MFA and Passwordless authentication.
      Parameters:
      flag - the passwordless_authorized flag
      Returns:
      this
    • withBackupEligible

      public WebAuthnCredential.Builder withBackupEligible(@Nullable Boolean flag)
      Build if this credential can be used from multiple devices.
      Parameters:
      flag - the backup_eligible flag
      Returns:
      this
    • withBackupStatus

      public WebAuthnCredential.Builder withBackupStatus(@Nullable Boolean flag)
      Build if this credential has been backed up and can be used from multiple devices.
      Parameters:
      flag - the backup_status flag
      Returns:
      this
    • withAaguid

      public WebAuthnCredential.Builder withAaguid(@Nullable String guid)
      Build a unique identifier that conveys the authenticator's make and model, or the passkey's provider identity.
      Parameters:
      guid - the aaguid value
      Returns:
      this
    • withRegisteredAs

      public WebAuthnCredential.Builder withRegisteredAs(@Nullable String regAs)
      Build the registration flow that was used to register this WebAuthn credential.
      Parameters:
      regAs - the registered_as value
      Returns:
      this
    • withTransports

      public WebAuthnCredential.Builder withTransports(@Nullable List<String> trans)
      Build the transports the authenticator can use to communicate with a client.
      Parameters:
      trans - the transports
      Returns:
      this
    • withAdditionalProperty

      public WebAuthnCredential.Builder withAdditionalProperty(@Nonnull String name, @Nullable Object value)
      Build any additional property not explicitly listed.
      Parameters:
      name - the property name
      value - the property value
      Returns:
      this
    • build

      public WebAuthnCredential build()
      Returns:
      an initialised, immutable, and safely published WebAuthnCredential instance.