Skip to main content

Authorize user via jwt

Project description

jwt_user

A Python implementation of acquiring, authorizing user from jwt token. designed to work for any request entity from flask,django,tornado frameworks.

Installing

Install with pip:

$ pip install jwt_user

Usage

>>> import jwt_user
>>> payload = {'username': 'test'}
>>> token = jwt_user.generate_token(payload)
>>> request = jwt_user.generate_request(token)
>>> user = jwt_user.get_jwt_user(request)
>>> user
{}
>>> user.username
'test'
>>> 

Documentation

View the full docs online at https://jwt_user.readthedocs.io/en/latest/

Tests

You can run tests from the project root after cloning with:

$ make smoke

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

jwt_user-0.0.3.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

jwt_user-0.0.3-py3-none-any.whl (5.4 kB view hashes)

Uploaded Python 3

Supported by

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