Skip to content

Commit

Permalink
task: restructure package
Browse files Browse the repository at this point in the history
  • Loading branch information
svaponi committed Jun 16, 2022
1 parent a8f10ac commit 3ac37f0
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Library for Auth0 token validation.
## Usage

```python
from auth0.auth0 import Auth0, Auth0Error
from pyauth0 import Auth0, Auth0Error

auth0 = Auth0(
auth0_domain="your-tenant-dev.us.auth0.com",
auth0_domain="your-tenant-dev.us.pyauth0.com",
api_audience="https://api-dev.your-tenant.com",
jwks_cache_ttl=60, # optional
)
Expand All @@ -18,8 +18,8 @@ try:
)
except Auth0Error as error:
status_code = error.status_code # suggested status code (401 or 403)
code = error.code # auth0 error code (example "invalid_header")
description = error.description # auth0 error description (example "Unable to parse authentication token")
code = error.code # pyauth0 error code (example "invalid_header")
description = error.description # pyauth0 error description (example "Unable to parse authentication token")
raise

claim_value = token_payload.get_claim("http://your-tenant.com/claim_name", "default value")
Expand Down
1 change: 0 additions & 1 deletion auth0/VERSION

This file was deleted.

Empty file removed auth0/__init__.py
Empty file.
1 change: 1 addition & 0 deletions pyauth0/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.2
File renamed without changes.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
long_description = f.read()


with open("auth0/VERSION", "r") as f:
with open("pyauth0/VERSION", "r") as f:
version = f.read().strip()


Expand Down
4 changes: 2 additions & 2 deletions test/test_auth0.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import pytest

from auth0.auth0 import TokenPayload, Auth0
from pyauth0.auth0 import TokenPayload, Auth0

AUTH0_DOMAIN = "your-tenant.us.auth0.com"
AUTH0_DOMAIN = "your-tenant.us.pyauth0.com"
API_AUDIENCE = "https://api.your-tenant.com"
CLIENT_ID = "9H1uYwvag..."
TEST_USER = "test user email"
Expand Down

0 comments on commit 3ac37f0

Please sign in to comment.