Flask JWT consumer
Flask extension for JWT token validation
Based on pyJWT. Supports multi public key validation in form of simplified authorized_keys format, with only keys, and comments, no options. Good for key rotations or when you need multi issuer support.
Rational
Inspired by Flask JWT Simple, nice package I was enjoying until the need for multi key support. So that's where many backward compatible settings came from.
Configuration
JWT_ALGORITHMdefaultRS256, algorithm used to decode JWT. As current iteration only asymmetric algorithms are considered. So anything symmetric will likely fail.JWT_HEADER_NAMEdefaultAuthorization, header where JWT expected to be.JWT_HEADER_TYPEdefaultBearer, type of the token, part of the header's value.JWT_IDENTITYoptional, if provided JWT will use it.JWT_AUTHORIZED_KEYSnew line separated list of OpenSSH formatted keys.VERIFY_AUDdisable verification ofaudduring JWT decoding.
Decorators
@requires_jwt - use on the flask endpoint that is desired to be protected, accepts additional parameter pass_token_payload which will add named parameter token_payload at the very end of the parameters accepted by decorated function.
@requires_jwt
def get(search):
# ...GET logic with search parameter
@requires_jwt(pass_token_payload=True)
def post(data, token_payload):
# ...POST logic with data parameter and token payload
Metadata
Release files for flask-jwt-consumer 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flask_jwt_consumer-1.1.0.tar.gz | 5.2 kB | Without provenance | Details for flask_jwt_consumer-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flask_jwt_consumer-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for flask_jwt_consumer-1.1.0-py3-none-any.whl |
Total release size: 12.9 kB
Release files / flask_jwt_consumer-1.1.0.tar.gz
| Download URL | flask_jwt_consumer-1.1.0.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53a9f890907f764f28743c659a55615dbfa100f145299be36bd70530347c4afb
|
|
BLAKE2b-256 checksum How to use checksums |
4ed48f492c1854327f62681a51fddc82c8acc38fd47ae3e2ecedac8f20f9f287
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.4.3 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.6
|
Release files / flask_jwt_consumer-1.1.0-py3-none-any.whl
| Download URL | flask_jwt_consumer-1.1.0-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f2425cfaf7b512361c26e6eda8d796fac328fb8e296df5af18ff626780322ede
|
|
BLAKE2b-256 checksum How to use checksums |
010389c5beb924268e2f11a6bfb4cfc07db3d29d2de3345085c071286839c93a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.4.3 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.6
|
Security for flask-jwt-consumer 1.1.0
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.