Simple AWS Cognito client to simplify implementation
Project description
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")
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
Built Distribution
File details
Details for the file cognito-oauthtools-1.0.1.tar.gz
.
File metadata
- Download URL: cognito-oauthtools-1.0.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3186cd455ae00e9dde4c5e2b2ed694a9984efc08b39ec6f35eb265bc9f10dae |
|
MD5 | 6cd6e90bc2e3b6b415d2f820558c8a9d |
|
BLAKE2b-256 | d64cc3654ef3df91994d00949b5309733b908c4da49e1187a3f620964a7c6d0e |
File details
Details for the file cognito_oauthtools-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: cognito_oauthtools-1.0.1-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0398d9fc31db9cb5815a1e54f99d850ba9f637dfe1322c8aabef66ae457330b1 |
|
MD5 | bfc073e174e40550a51886acc86c3d85 |
|
BLAKE2b-256 | 54d92ed84ded369a4402d9a39f1cf73419c46e8edf3b5371f8687fa0865ff679 |