Decode and verify Amazon Cognito JWT tokens
Project description
Decode and verify Amazon Cognito JWT tokens
Note: tested on Python >= 3.6, compatible with PEP-492 (async/await coroutines syntax)
Installation
pip install cognitojwt
Usage
import cognitojwt
id_token = '<YOUR_TOKEN_HERE>'
REGION = '**-****-*'
USERPOOL_ID = 'eu-west-1_*******'
APP_CLIENT_ID = '1p3*********'
verified_claims = cognitojwt.decode(
id_token,
REGION,
USERPOOL_ID,
APP_CLIENT_ID,
testmode=True # disable token expiration checking for testing purposes
)
# async
verified_claims = await cognitojwt.decode_async(
id_token,
REGION,
USERPOOL_ID,
APP_CLIENT_ID,
testmode=True # disable token expiration checking for testing purposes
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cognitojwt-1.0.2.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for cognitojwt-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77a040818963618a1140015d63d9afd727e93df9099421738be8984e298d4999 |
|
MD5 | 91d8d623d518875066d2a74005a8a69d |
|
BLAKE2b-256 | 1b1d4839aeafd2524286261a0389287f3b7dea1aaa1965a5d735ac481482725e |