Class AuthenticationMethod
java.lang.Object
com.auth0.json.mgmt.users.authenticationmethods.AuthenticationMethod
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionApplies to passkeys only.Applies to passkeys only.getEmail()
getId()
Applies to passkeys only.getKeyId()
getName()
getType()
Applies to passkeys only.void
Set the email address used to send verification messages.void
The id of the credential.void
Set a human-readable label to identify the authentication method.void
setPhoneNumber
(String phoneNumber) Set the destination phone number used to send verification codes via text and voice.void
setPreferredAuthenticationMethod
(String preferredAuthenticationMethod) Set the preferred phone authentication method.void
setPublicKey
(String publicKey) Set the public key.void
setRelyingPartyIdentifier
(String relyingPartyIdentifier) Set the relying party identifier.void
setTotpSecret
(String totpSecret) Set the base32 encoded secret for TOTP generation.void
Sets the type of this enrollment Should be ["phone" or "email" or "totp" or "webauthn-roaming"]
-
Constructor Details
-
AuthenticationMethod
public AuthenticationMethod()Create a new instance.
-
-
Method Details
-
getId
- Returns:
- the ID of this enrollment.
-
getType
- Returns:
- the type of this enrollment
-
setType
Sets the type of this enrollment Should be ["phone" or "email" or "totp" or "webauthn-roaming"]- Parameters:
type
- the type of the enrollment.
-
getConfirmed
- Returns:
- the enrollment status
-
getName
- Returns:
- A human-readable label to identify the authentication method.
-
setName
Set a human-readable label to identify the authentication method.- Parameters:
name
- A human-readable label to identify the authentication method.
-
getLinkId
- Returns:
- the indication that the authenticator is linked to another authenticator
-
getPhoneNumber
- Returns:
- The destination phone number used to send verification codes via text and voice. Applies to phone authentication methods only.
-
setPhoneNumber
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
- Returns:
- The email address used to send verification messages. Applies to email authentication methods only.
-
setEmail
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
- Returns:
- The id of the credential. Applies to email webauthn authenticators only.
-
setKeyId
The id of the credential. Applies to email webauthn authenticators only.- Parameters:
keyId
- The id of the credential.
-
getPublicKey
- Returns:
- The public key. Applies to email webauthn authenticators only.
-
setPublicKey
Set the public key. Applies to email webauthn authenticators only.- Parameters:
publicKey
- The public key. Applies to email webauthn authenticators only.
-
getCreatedAt
- Returns:
- Authenticator creation date
-
getEnrolledAt
- Returns:
- Enrollment date
-
getLastAuthedAt
- Returns:
- Last authentication
-
getTotpSecret
- Returns:
- The base32 encoded secret for TOTP generation. Applies to totp authentication methods only.
-
setTotpSecret
Set the base32 encoded secret for TOTP generation. Applies to totp authentication methods only.- Parameters:
totpSecret
- The base32 encoded secret for TOTP generation.
-
getPreferredAuthenticationMethod
- Returns:
- Preferred phone authentication method.
-
setPreferredAuthenticationMethod
Set the preferred phone authentication method.- Parameters:
preferredAuthenticationMethod
- Preferred phone authentication method.
-
getRelyingPartyIdentifier
- Returns:
- The relying party identifier. Applies to email webauthn authenticators only.
-
setRelyingPartyIdentifier
Set the relying party identifier. Applies to email webauthn authenticators only.- Parameters:
relyingPartyIdentifier
- The relying party identifier. Applies to email webauthn authenticators only.
-
getAuthenticationMethods
- Returns:
- list of authentication methods
-
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
Applies to passkeys only.- Returns:
- Whether the credential was backed up.
-
getIdentityUserId
Applies to passkeys only.- Returns:
- The ID of the user identity linked with the authentication method.
-
getUserAgent
Applies to passkeys only.- Returns:
- The user-agent of the browser used to create the passkey.
-