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.3.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for cognitojwt-0.4.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21959cd2e1331743f0fd5eaf1817267f548e6b85725fd16d2cae92459cdf6c98 |
|
MD5 | 184e720d621e7454a755ffeebeaa4071 |
|
BLAKE2b-256 | f047e6c6c2406dcffc0fcfe4b519306ee4afe9fe62d5af65ab1295ffae7076ba |