Package com.auth0.json.mgmt.users
Class User
java.lang.Object
com.auth0.json.mgmt.users.User
- All Implemented Interfaces:
Serializable
Class that represents an Auth0 User object. Related to the
UsersEntity
entity.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGetter for the metadata of the application.Getter for the date this user was created on.getEmail()
Getter for the user's email.Getter for the user's family name.Getter for the user's given name.getId()
Getter for the user's unique identifier.Getter for the list of user's identities information.Getter for the last login IP.Getter for the last login date.Getter for the last password reset date.Getter for the number of logins for this user.Getter for the list of multifactor providers that the user has enrolled to.getName()
Getter for the user's name.Getter for the user's nickname.Getter for the user's phone number (following the E.164 recommendation), only valid for users from SMS connections.Getter for the user's picture url.Getter for the date this user was last updated on.Getter for the metadata of the user.Getter for the user's username.Whether the user is blocked or not.Whether the email was verified or not.Whether the phone number was verified or not.void
setAppMetadata
(Map<String, Object> appMetadata) Setter for the metadata of the application.void
setBlocked
(Boolean blocked) Sets if the user is blocked or not.void
setClientId
(String clientId) Setter for the Auth0 Application's client ID.void
setConnection
(String connection) Setter for the connection this user will be created into.void
Setter for the user's email.void
setEmailVerified
(Boolean emailVerified) Sets if the email was verified or not.void
setFamilyName
(String familyName) Setter for the user's family name.void
setGivenName
(String givenName) Setter for the user's given name.void
Setter for the user's unique identifier.void
Setter for the user's name.void
setNickname
(String nickname) Setter for the user's nickname.void
setPassword
(char[] password) Setter for the password this user will have once created.void
setPassword
(String password) Deprecated.Use setPassword(char[]) instead.void
setPhoneNumber
(String phoneNumber) Setter for the user's phone number (following the E.164 recommendation), only valid when creating a user on SMS connections.void
setPhoneVerified
(Boolean phoneVerified) Sets if the phone number was verified or not.void
setPicture
(String picture) Setter for the user's picture url.void
setUserMetadata
(Map<String, Object> userMetadata) Setter for the metadata of the user.void
setUsername
(String username) Setter for the user's username.void
setVerifyEmail
(Boolean verifyEmail) Sets if an email change should be verified.void
setVerifyPassword
(Boolean verifyPassword) Sets if a password change should be verified via email.void
setVerifyPhoneNumber
(Boolean verifyPhoneNumber) Sets if a phone number change should be verified.
-
Constructor Details
-
User
public User() -
User
-
-
Method Details
-
setConnection
Setter for the connection this user will be created into.- Parameters:
connection
- the connection to set.
-
setPassword
Deprecated.Use setPassword(char[]) instead.Setter for the password this user will have once created.- Parameters:
password
- the password to set.
-
setPassword
public void setPassword(char[] password) Setter for the password this user will have once created.- Parameters:
password
- the password to set.
-
getUsername
Getter for the user's username.- Returns:
- the username.
-
setUsername
Setter for the user's username.- Parameters:
username
- the username
-
getEmail
Getter for the user's email.- Returns:
- the email.
-
setEmail
Setter for the user's email.- Parameters:
email
- the email to set.
-
isEmailVerified
Whether the email was verified or not.- Returns:
- true if the email was verified, false otherwise.
-
setEmailVerified
Sets if the email was verified or not.- Parameters:
emailVerified
- whether the email was verified or not.
-
getPhoneNumber
Getter for the user's phone number (following the E.164 recommendation), only valid for users from SMS connections.- Returns:
- the user's phone number.
-
setPhoneNumber
Setter for the user's phone number (following the E.164 recommendation), only valid when creating a user on SMS connections.- Parameters:
phoneNumber
- the phone number to set.
-
isPhoneVerified
Whether the phone number was verified or not.- Returns:
- true if the phone number was verified, false otherwise.
-
setPhoneVerified
Sets if the phone number was verified or not.- Parameters:
phoneVerified
- whether the phone number was verified or not.
-
getId
Getter for the user's unique identifier.- Returns:
- the user id.
-
setId
Setter for the user's unique identifier. This is only valid when creating a new user, as the property can't change once set. The server will prepend the connection name and a pipe character before the given id value. i.e. For "auth0" connection with user id "123456789" the final user id would be "auth0|123456789".- Parameters:
userId
- the id of the user
-
getPicture
Getter for the user's picture url.- Returns:
- the picture url.
-
setPicture
Setter for the user's picture url.- Parameters:
picture
- the picture url to set.
-
getName
Getter for the user's name.- Returns:
- the name.
-
setName
Setter for the user's name.- Parameters:
name
- the name to set.
-
getNickname
Getter for the user's nickname.- Returns:
- the nickname.
-
setNickname
Setter for the user's nickname.- Parameters:
nickname
- the nickname to set.
-
getGivenName
Getter for the user's given name.- Returns:
- the given name.
-
setGivenName
Setter for the user's given name.- Parameters:
givenName
- the given name to set.
-
getFamilyName
Getter for the user's family name.- Returns:
- the family name.
-
setFamilyName
Setter for the user's family name.- Parameters:
familyName
- the family name to set.
-
getCreatedAt
Getter for the date this user was created on.- Returns:
- the created at.
-
getUpdatedAt
Getter for the date this user was last updated on.- Returns:
- the updated at.
-
getIdentities
Getter for the list of user's identities information. More than one will exists in case accounts are linked.- Returns:
- the list of user's identities.
-
getAppMetadata
Getter for the metadata of the application.- Returns:
- the application metadata.
-
setAppMetadata
Setter for the metadata of the application.- Parameters:
appMetadata
- the application metadata to set.
-
getUserMetadata
Getter for the metadata of the user.- Returns:
- the user metadata.
-
setUserMetadata
Setter for the metadata of the user.- Parameters:
userMetadata
- the user metadata to set.
-
getMultifactor
Getter for the list of multifactor providers that the user has enrolled to.- Returns:
- the list of enrolled multifactor providers.
-
getLastIP
Getter for the last login IP.- Returns:
- the last IP.
-
getLastLogin
Getter for the last login date.- Returns:
- the last login.
-
getLastPasswordReset
Getter for the last password reset date. Only available for Database Connection users.- Returns:
- the last password reset.
-
getLoginsCount
Getter for the number of logins for this user.- Returns:
- the logins count.
-
isBlocked
Whether the user is blocked or not.- Returns:
- true if the user is blocked, false otherwise.
-
setBlocked
Sets if the user is blocked or not.- Parameters:
blocked
- whether the user is blocked or not.
-
setClientId
Setter for the Auth0 Application's client ID. Only useful when updating the email.- Parameters:
clientId
- the application's client ID to set.
-
setVerifyPassword
Sets if a password change should be verified via email.- Parameters:
verifyPassword
- true if a password change should be verified via email, false otherwise.
-
setVerifyEmail
Sets if an email change should be verified.- Parameters:
verifyEmail
- true if an email change should be verified, false otherwise.
-
setVerifyPhoneNumber
Sets if a phone number change should be verified.- Parameters:
verifyPhoneNumber
- true if a phone number change should be verified, false otherwise.
-
getValues
-