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.1.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for cognitojwt-0.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5ed9fa57d7e8cd3cc6390ac9c4aef449941bb76d21e9ae287625ae79e6797f1 |
|
MD5 | aeee2638e643d48b13c6c1d0e4b753c5 |
|
BLAKE2b-256 | fa86ec46af67492f11706ce0735db3667694967e0a27eb4349b29673571e2cda |