Metadata-Version: 2.1
Name: cognitojwt
Version: 1.0.1
Summary: Decode and verify Amazon Cognito JWT tokens
Home-page: http://github.com/borisrozumnuk/cognitojwt
Author: Boris Rozumniuk
Author-email: borisrozumnuk@gmail.com
License: MIT
Keywords: Amazon Cognito JWT
Platform: Any
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
Provides-Extra: async
Provides-Extra: sync
Requires-Dist: python-jose
Provides-Extra: async
Requires-Dist: aiohttp; extra == 'async'
Requires-Dist: async-lru; extra == 'async'
Provides-Extra: sync
Requires-Dist: requests; extra == 'sync'

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

```

