Skip to main content

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


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cognitojwt-0.4.3-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file cognitojwt-0.4.3.tar.gz.

File metadata

  • Download URL: cognitojwt-0.4.3.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

File hashes

Hashes for cognitojwt-0.4.3.tar.gz
Algorithm Hash digest
SHA256 a3ab878e8b1b32d6bb935b20dedf48dad6c64f5c5edb07fc25e0b48070db36ea
MD5 834f70dd51318d35222f097e3916534e
BLAKE2b-256 0e52a15b23088dbc9e578a1f834620c501b76080444122dd71bd2a90830e5ace

See more details on using hashes here.

File details

Details for the file cognitojwt-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: cognitojwt-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

File hashes

Hashes for cognitojwt-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 21959cd2e1331743f0fd5eaf1817267f548e6b85725fd16d2cae92459cdf6c98
MD5 184e720d621e7454a755ffeebeaa4071
BLAKE2b-256 f047e6c6c2406dcffc0fcfe4b519306ee4afe9fe62d5af65ab1295ffae7076ba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page