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.2.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for cognitojwt-0.4.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c422f1e00c0dc64a0543fe1ba2a95cb1d85284d1b09f8e634cd961c16c3422d7 |
|
MD5 | a245b032c56e8ec6da8131629047dd27 |
|
BLAKE2b-256 | 56050cb71b93e5e0a5aefe35a14b488a3026c748f2eb7af13dba79e895231911 |