The ultimate Python library for JOSE RFCs, including JWS, JWE, JWK, JWA, JWT
Project description
joserfc is a Python library that provides a comprehensive implementation of several essential JSON Object Signing and Encryption (JOSE) standards.
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: JSON Web Key (JWK) Thumbprint
RFC7797: JSON Web Signature (JWS) Unencoded Payload Option
RFC8037: OKP Key and EdDSA algorithm
RFC8812: ES256K algorithm
RFC9278: JWK Thumbprint URI
RFC9864: Ed25519 and Ed448 algorithms
And draft RFCs implementation of:
draft-ietf-jose-deprecate-none-rsa15-02
draft-amringer-jose-chacha-02
draft-madden-jose-ecdh-1pu-04
Usage
A quick and simple JWT encoding and decoding would look something like this:
>>> from joserfc import jwt, jwk
>>> key = jwk.import_key("your-secret-key", "oct")
>>> encoded_jwt = jwt.encode({"alg": "HS256"}, {"k": "value"}, key)
>>> encoded_jwt
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJrIjoidmFsdWUifQ._M8ViO_GK6TnZ9G9eqdlS7IpNWzhoGwaYYDQ3hEwwmA'
>>> token = jwt.decode(encoded_jwt, key)
>>> token.header
{'alg': 'HS256', 'typ': 'JWT'}
>>> token.claims
{'key': 'value'}
>>> claims_requests = jwt.JWTClaimsRegistry()
>>> claims_requests.validate(token.claims)
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-1.6.1.tar.gz.
File metadata
- Download URL: joserfc-1.6.1.tar.gz
- Upload date:
- Size: 226.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7759a14d732d93503317468c0dd258510c4f64b30759cf42e96016c97b38c4b7
|
|
| MD5 |
734f9fa8ff34375cdad81ec52b102bf8
|
|
| BLAKE2b-256 |
c73d82375487dcc2bcdf136a68e1a8543165feccbbc8833dfc451f87a5f83b81
|
Provenance
The following attestation bundles were made for joserfc-1.6.1.tar.gz:
Publisher:
pypi.yml on authlib/joserfc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
joserfc-1.6.1.tar.gz -
Subject digest:
7759a14d732d93503317468c0dd258510c4f64b30759cf42e96016c97b38c4b7 - Sigstore transparency entry: 782128557
- Sigstore integration time:
-
Permalink:
authlib/joserfc@f6756771d0051fe4ff1282bcbde8883c230f893d -
Branch / Tag:
refs/tags/1.6.1 - Owner: https://github.com/authlib
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@f6756771d0051fe4ff1282bcbde8883c230f893d -
Trigger Event:
push
-
Statement type:
File details
Details for the file joserfc-1.6.1-py3-none-any.whl.
File metadata
- Download URL: joserfc-1.6.1-py3-none-any.whl
- Upload date:
- Size: 70.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74d158c9d56be54c710cdcb2a0741372254b682ad2101a0f72e5bd0e925695f0
|
|
| MD5 |
bc6a2f97d2f5c46321a61960edd79057
|
|
| BLAKE2b-256 |
a1019674cc6d478406ae61d910cb16ca8b5699a8a9e6a2019987ebe5a5957d1d
|
Provenance
The following attestation bundles were made for joserfc-1.6.1-py3-none-any.whl:
Publisher:
pypi.yml on authlib/joserfc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
joserfc-1.6.1-py3-none-any.whl -
Subject digest:
74d158c9d56be54c710cdcb2a0741372254b682ad2101a0f72e5bd0e925695f0 - Sigstore transparency entry: 782128559
- Sigstore integration time:
-
Permalink:
authlib/joserfc@f6756771d0051fe4ff1282bcbde8883c230f893d -
Branch / Tag:
refs/tags/1.6.1 - Owner: https://github.com/authlib
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@f6756771d0051fe4ff1282bcbde8883c230f893d -
Trigger Event:
push
-
Statement type: