The ultimate Python library for JOSE RFCs, including JWS, JWE, JWK, JWA, JWT
Project description
# JOSE RFC
joserfc is a Python implementation of JSON Object Signing and Encryption (JOSE).
This package contains implementation of:
RFC7515: JSON Web Signature
RFC7516: JSON Web Encryption
RFC7517: JSON Web Key
RFC7518: JSON Web Algorithms
RFC7519: JSON Web Token
RFC7520: Examples of Protecting Content Using JSON Object Signing and Encryption
RFC7638: thumbprint for JWK
RFC8037: OKP Key and EdDSA algorithm
RFC8812: ES256K algorithm
And draft RFCs implementation of:
C20P and XC20P
ECDH-1PU algorithms
Usage
A quick and simple JWT encoding and decoding would look something like this:
>>> from joserfc import jwt
>>> encoded = jwt.encode({"alg": "HS256"}, {"k": "value"}, "secret")
>>> encoded
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrIjoidmFsdWUifQ.ni-MJXnZHpFB_8L9P9yllj3RNDfzmD4yBKAyefSctMY'
>>> token = jwt.decode(encoded, "secret")
>>> token.header
{'alg': 'HS256', 'typ': 'JWT'}
>>> token.claims
{'k': 'value'}
Useful Links
License
Licensed under BSD. Please see LICENSE for licensing details.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file joserfc-0.2.0.tar.gz.
File metadata
- Download URL: joserfc-0.2.0.tar.gz
- Upload date:
- Size: 37.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
158f745ed2d54eece8b46873d7441dc142a0ca780b0b13c7aa7b99a048c21f12
|
|
| MD5 |
75eadb2047e0f7597551ffbe68aad2ee
|
|
| BLAKE2b-256 |
a8285bec50ef21aae37461d36f66d92c0e735f67272f834f2bb36a13942fc570
|
File details
Details for the file joserfc-0.2.0-py3-none-any.whl.
File metadata
- Download URL: joserfc-0.2.0-py3-none-any.whl
- Upload date:
- Size: 51.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdded460b189ab85c9160ae272ecb0919e2d22eae57df5f4efaca770f385366a
|
|
| MD5 |
f10082298f30474a41d46e6e18af66cf
|
|
| BLAKE2b-256 |
fb4b3bc79ccc4c32d522b5a5401b96663f8a8ec3dbc26eb7f87ef692b7e04c6c
|