Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #16 from kevna/multiple_app_clients
Browse files Browse the repository at this point in the history
Example for multiple app clients
  • Loading branch information
borisrozumnuk authored Jun 7, 2021
2 parents de1214b + 5721b39 commit 6a9b452
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,16 @@ verified_claims: dict = await cognitojwt.decode_async(

Note: if the application is deployed inside a private vpc without internet gateway, the application will not be able to download the JWKS file.
In this case set the `AWS_COGNITO_JWKS_PATH` environment variable referencing the absolute or relative path of the jwks.json file.

It is possible to allow multiple app client ids by passing the value as a Container instance such as a list or tuple:
```python
ALLOWED_CLIENT_IDS = ('client_one', 'client_two')

verified_claims: dict = cognitojwt.decode(
id_token,
REGION,
USERPOOL_ID,
app_client_id=ALLOWED_CLIENT_IDS,
testmode=True # Disable token expiration check for testing purposes
)
```
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

setup(
name='cognitojwt',
version='1.4.0',
version='1.4.1',
description='Decode and verify Amazon Cognito JWT tokens',
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 6a9b452

Please sign in to comment.