Decode and verify Amazon Cognito JWT tokens
Project description
Decode and verify Amazon Cognito JWT tokens
Note: works on Python >= 3.6
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-0.4.0.tar.gz
(2.5 kB
view hashes)
Built Distribution
Close
Hashes for cognitojwt-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd6d5d1ab97ee45c69364ce0b532877f20f83457b662ce32a30b0aaaf05c9b3b |
|
MD5 | 700b4d370a5173222b56d21c38de5dcf |
|
BLAKE2b-256 | 41afd8c25c4e7df53f60bffb0a1082c7e2ef2978340fb7d5fc35e3296e18f905 |