Auth0 is an authentication and authorization platform. This Parsons integration with the Auth0 Management API supports fetching and deleting user records.
To instantiate the Auth0 class, you can either store your Auth0 API client ID, client secret, and domain as environment variables (
AUTH0_DOMAIN, respectively) or pass in your client ID, client secret, and domain as arguments:
from parsons import Auth0 # First approach: Use API credentials via environmental variables auth0 = Auth0() # Second approach: Pass API credentials as arguments auth0 = Shopify('auth0_client_id', 'auth0_client_secret', 'auth0_domain')
You can then call various endpoints:
# Fetch user by email user = auth0.get_users_by_email('firstname.lastname@example.org')
- class parsons.Auth0(client_id=None, client_secret=None, domain=None)[source]
Instantiate the Auth0 class
- client_id: str
The Auth0 client ID. Not required if
AUTH0_CLIENT_IDenv variable set.
- client_secret: str
The Auth0 client secret. Not required if
AUTH0_CLIENT_SECRETenv variable set.
- domain: str
The Auth0 domain. Not required if
AUTH0_DOMAINenv variable set.
Delete Auth0 user.
- id: str
The user ID of the record to delete.