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-0.5.0.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for cognitojwt-0.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6c9b96e93bcb69002715d5c7d41e403e0b5e33a657c61f9101874078721776f |
|
MD5 | 05dd5ec7a329cadb97674b953a0e8762 |
|
BLAKE2b-256 | b1500b1e6b20c22e7025be8af7a05dfc4c0095a70c2bf803d5b33d65aafcb63d |