Skip to main content

Json Web Token based authentication for Python Chalice

# Maintainers wanted

Chalice-JWT

chalice-jwt provides a simple interface for jwt based authentication with AWS Chalice microframework(serverless). source code available at: https://github.com/marktennyson/chalice-jwt

Usage

from chalice import Chalice
from chalice_jwt import JWTManager
from datetime import timedelta

app = Chalice(app_name='test-jwt')

jwt = JWTManager(jwtSecret="top-secret-key", app=app)


@app.route('/')
def index():
    return {'hello': 'world'}

@app.route('/get-token')
def token():
    Identity:dict = {"email":"aniketsarkar@yahoo.com"}
    return {'token': jwt.create_access_token(identity=Identity, expires_in=timedelta(seconds=60)),}

@app.route('/get-identity')
@jwt.its_required
def login():
    return jwt.get_jwt_identity()

Installation

chalice-jwt is available from pypi.

install using pip

pip install chalice-jwt

install from source code

git clone https://github.com/marktennyson/chalice-jwt && cd chalice-jwt
python setup.py install --user

Compatibility

chalice-jwt is compatiable with all python3 versions. Not available for Python version 2.

Contributing

We welcome contributions of all types!

Metadata

Release files for chalice-jwt 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 chalice-jwt 1.0.1
File Size Uploaded Provenance Actions
chalice-jwt-1.0.1.tar.gz 4.6 kB Without provenance Details for chalice-jwt-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for chalice-jwt 1.0.1
File Interpreter ABI Platform Actions
chalice_jwt-1.0.1-py3-none-any.whl Python 3 none any Details for chalice_jwt-1.0.1-py3-none-any.whl

Total release size: 9.3 kB

Release files / chalice-jwt-1.0.1.tar.gz

Download URL chalice-jwt-1.0.1.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
42f9bfcd92bb36526ce3e3883223a5c748c691bfc4f7eaa1af31962436e24307
BLAKE2b-256 checksum
How to use checksums
510295488fec481660e018d589555f47d5e83cbad1d0cd9da8e9c8d06d30674b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

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

Download URL chalice_jwt-1.0.1-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
df04773434e5d989cc2ca26939534e54180648b64c8238fa6d354cf67547e1a3
BLAKE2b-256 checksum
How to use checksums
5338c7cfd55c8c58ece01073c207cd808d5a47496e8cd4ffdc68252ca2032a67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

Security for chalice-jwt 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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