Skip to main content

Version Build Status Supported Versions

cognito-oauthtools

Simple AWS Cognito client to simplify project implementation.

Getting Started

Installation

cognito-oauthtools can easily be install using pip:

pip install cognito-oauthtools

Objects

Client

cognito_oauthtools.Client

Intializing

To intialize a cognito_oauthtools.Client, you must pass it:

  • endpoint

    The dns name of the Cognito endpoint

  • client_id

    The id of your Cognito authorizer clinet

  • client_secret

    The secret for your Cognito client

  • host_domain

    The domain name of the server that cognito will hit with oauth redirects

  • logout_path = "/"

    Path on the host to return to after logging out

  • redirect_path = "/oauth"

    Path on the host to return to after logging in

oauth = cognito_oauthtools.Client('ENDPOINT.amazoncognito.com', 'CLIENT_ID', 'CLIENT_SECRET', 'myapp.example')

Properties

  • loginUrl

    Cognito URL to authorize

  • registerUrl

    Cognito URL to register a new user

  • logoutUrl

    Cognito URL to logout

Methods

  • get_token(code)

    Method that gets cognito token from the oauth return code

User

cognito_oauthtools.User

Intializing

To intialize a cognito_oauthtools.User, you must pass it:

  • client

    cognito_oauthtools.Client object for the user to use

  • token

    The user's authorization token

user = cognito_oauthtools.User(client, "xxxxTOKENxxxx")

Metadata

Release files for cognito-oauthtools 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cognito-oauthtools 1.0.1
File Size Uploaded Provenance
cognito-oauthtools-1.0.1.tar.gz 2.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cognito-oauthtools 1.0.1
File Interpreter ABI Platform
cognito_oauthtools-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.9 kB

Release files / cognito-oauthtools-1.0.1.tar.gz

Download URL cognito-oauthtools-1.0.1.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d3186cd455ae00e9dde4c5e2b2ed694a9984efc08b39ec6f35eb265bc9f10dae
BLAKE2b-256 checksum
How to use checksums
d64cc3654ef3df91994d00949b5309733b908c4da49e1187a3f620964a7c6d0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6

Release files / cognito_oauthtools-1.0.1-py3-none-any.whl

Download URL cognito_oauthtools-1.0.1-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0398d9fc31db9cb5815a1e54f99d850ba9f637dfe1322c8aabef66ae457330b1
BLAKE2b-256 checksum
How to use checksums
54d92ed84ded369a4402d9a39f1cf73419c46e8edf3b5371f8687fa0865ff679
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.6

Security for cognito-oauthtools 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page