Class AuthenticationMethod

java.lang.Object
com.auth0.json.mgmt.users.authenticationmethods.AuthenticationMethod

public class AuthenticationMethod extends Object
  • Constructor Details

    • AuthenticationMethod

      public AuthenticationMethod()
      Create a new instance.
  • Method Details

    • getId

      public String getId()
      Returns:
      the ID of this enrollment.
    • getType

      public String getType()
      Returns:
      the type of this enrollment
    • setType

      public void setType(String type)
      Sets the type of this enrollment Should be ["phone" or "email" or "totp" or "webauthn-roaming"]
      Parameters:
      type - the type of the enrollment.
    • getConfirmed

      public Boolean getConfirmed()
      Returns:
      the enrollment status
    • getName

      public String getName()
      Returns:
      A human-readable label to identify the authentication method.
    • setName

      public void setName(String name)
      Set a human-readable label to identify the authentication method.
      Parameters:
      name - A human-readable label to identify the authentication method.
    • getLinkId

      public String getLinkId()
      Returns:
      the indication that the authenticator is linked to another authenticator
    • getPhoneNumber

      public String getPhoneNumber()
      Returns:
      The destination phone number used to send verification codes via text and voice. Applies to phone authentication methods only.
    • setPhoneNumber

      public void setPhoneNumber(String phoneNumber)
      Set the destination phone number used to send verification codes via text and voice. Applies to phone authentication methods only.
      Parameters:
      phoneNumber - The destination phone number used to send verification codes via text and voice.
    • getEmail

      public String getEmail()
      Returns:
      The email address used to send verification messages. Applies to email authentication methods only.
    • setEmail

      public void setEmail(String email)
      Set the email address used to send verification messages. Applies to email authentication methods only.
      Parameters:
      email - The email address used to send verification messages.
    • getKeyId

      public String getKeyId()
      Returns:
      The id of the credential. Applies to email webauthn authenticators only.
    • setKeyId

      public void setKeyId(String keyId)
      The id of the credential. Applies to email webauthn authenticators only.
      Parameters:
      keyId - The id of the credential.
    • getPublicKey

      public String getPublicKey()
      Returns:
      The public key. Applies to email webauthn authenticators only.
    • setPublicKey

      public void setPublicKey(String publicKey)
      Set the public key. Applies to email webauthn authenticators only.
      Parameters:
      publicKey - The public key. Applies to email webauthn authenticators only.
    • getCreatedAt

      public Date getCreatedAt()
      Returns:
      Authenticator creation date
    • getEnrolledAt

      public Date getEnrolledAt()
      Returns:
      Enrollment date
    • getLastAuthedAt

      public Date getLastAuthedAt()
      Returns:
      Last authentication
    • getTotpSecret

      public String getTotpSecret()
      Returns:
      The base32 encoded secret for TOTP generation. Applies to totp authentication methods only.
    • setTotpSecret

      public void setTotpSecret(String totpSecret)
      Set the base32 encoded secret for TOTP generation. Applies to totp authentication methods only.
      Parameters:
      totpSecret - The base32 encoded secret for TOTP generation.
    • getPreferredAuthenticationMethod

      public String getPreferredAuthenticationMethod()
      Returns:
      Preferred phone authentication method.
    • setPreferredAuthenticationMethod

      public void setPreferredAuthenticationMethod(String preferredAuthenticationMethod)
      Set the preferred phone authentication method.
      Parameters:
      preferredAuthenticationMethod - Preferred phone authentication method.
    • getRelyingPartyIdentifier

      public String getRelyingPartyIdentifier()
      Returns:
      The relying party identifier. Applies to email webauthn authenticators only.
    • setRelyingPartyIdentifier

      public void setRelyingPartyIdentifier(String relyingPartyIdentifier)
      Set the relying party identifier. Applies to email webauthn authenticators only.
      Parameters:
      relyingPartyIdentifier - The relying party identifier. Applies to email webauthn authenticators only.
    • getAuthenticationMethods

      public List<AuthMethod> getAuthenticationMethods()
      Returns:
      list of authentication methods
    • getCredentialDeviceType

      public String getCredentialDeviceType()
      Applies to passkeys only.
      Returns:
      The kind of device the credential is stored on as defined by backup eligibility. "single_device" credentials cannot be backed up and synced to another device, "multi_device" credentials can be backed up if enabled by the end-user.
    • getCredentialBackedUp

      public Boolean getCredentialBackedUp()
      Applies to passkeys only.
      Returns:
      Whether the credential was backed up.
    • getIdentityUserId

      public String getIdentityUserId()
      Applies to passkeys only.
      Returns:
      The ID of the user identity linked with the authentication method.
    • getUserAgent

      public String getUserAgent()
      Applies to passkeys only.
      Returns:
      The user-agent of the browser used to create the passkey.