View Source Auth0Ex.Management.User (auth0_ex v0.9.0)
A module representing users on Auth0
Summary
Functions
Gets all the users
Creates a user for the specified connection
Deletes a user with a give user id
Deletes all users MFA authentication methods. Scopes: delete:authentication_methods
Deletes a user's multifactor provider
Get all Guardain enrollments for given user_id
Gets a specific user record with a given user id
Links the account specified in the body to the given user_id param
Get a user's log
Removes current Guardain recovery code and generates new one
List the roles associated with a user. Scopes: read:users read:roles
Unlinks an identity from the target user, and it becomes a separated user again.
Updates a user's information given a user id
Functions
Gets all the users
iex> Auth0Ex.Management.User.all()
iex> Auth0Ex.Management.User.all(fields: "name", q: "app_metadata.admin:'true'")
Creates a user for the specified connection
iex> Auth0Ex.Management.User.create("test_connection", %{email: "test.user@email.com", username: "test_user_name"})
Deletes a user with a give user id
iex> Auth0Ex.Management.User.delete("auth0|some_user_id")
Deletes all users MFA authentication methods. Scopes: delete:authentication_methods
iex > Auth0Ex.Management.User.delete_authentication_methods("auth0|23423")
Deletes a user's multifactor provider
iex> Auth0Ex.Management.User.delete_mfprovider("auth0|23423", "duo")
Get all Guardain enrollments for given user_id
iex> Auth0Ex.Management.User.enrollments("auth0|234")
Gets a specific user record with a given user id
iex> Auth0Ex.Management.User.get("auth0|some_user_id")
iex> Auth0Ex.Management.User.get("auth0|some_user_id", %{fields: "email,name,username"})
Links the account specified in the body to the given user_id param
iex> Auth0Ex.Management.User.link("some_user_id", link_with: "secondary_acc_jwt")
iex> Auth0Ex.Management.User.link("some_user_id", provider: "github", user_id: "23423", connection_id: "som")
Get a user's log
iex> Auth0Ex.Management.User.log("auth0|233423")
iex> Auth0Ex.Management.User.log("auth0|23423", page: 2, per_page: 10)
Removes current Guardain recovery code and generates new one
iex> Auth0Ex.Management.User.regenerate_recovery_code("auth0|34234")
List the roles associated with a user. Scopes: read:users read:roles
iex > Auth0Ex.Management.User.roles("auth0|23423")
Unlinks an identity from the target user, and it becomes a separated user again.
iex> Auth0Ex.Management.User.unlink("some_user_id", "github", "23984234")
Updates a user's information given a user id
iex> Auth0Ex.Management.User.update("auth0|some_user_id", %{app_metadata: %{admin: false}})