Skip to main content

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)

License

Licensed under BSD. Please see LICENSE for licensing details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

joserfc-1.7.5.tar.gz (235.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

joserfc-1.7.5-py3-none-any.whl (71.3 kB view details)

Uploaded Python 3

File details

Details for the file joserfc-1.7.5.tar.gz.

File metadata

  • Download URL: joserfc-1.7.5.tar.gz
  • Upload date:
  • Size: 235.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for joserfc-1.7.5.tar.gz
Algorithm Hash digest
SHA256 d5ff536e658e17664f8c1b1ab60dc4aa62aa973fcef1edd33cc44bda45d6f5ea
MD5 76820df88dd16266843b66317c3e3ad6
BLAKE2b-256 199480fea1514b7c6d7d37804d3fe9ca81455f633347fc98731bd71ffe1faa17

See more details on using hashes here.

Provenance

The following attestation bundles were made for joserfc-1.7.5.tar.gz:

Publisher: pypi.yml on authlib/joserfc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file joserfc-1.7.5-py3-none-any.whl.

File metadata

  • Download URL: joserfc-1.7.5-py3-none-any.whl
  • Upload date:
  • Size: 71.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for joserfc-1.7.5-py3-none-any.whl
Algorithm Hash digest
SHA256 add2c2c84e8373b084d526a8b53daba5d7a513a118cd2dcd9fc9f979d0922159
MD5 80c8d8aaabf02e2ff9df0ae004ca31e0
BLAKE2b-256 67c582addfd375e5ee6520644e0553e4aadde92d668c4fc99cc716d337fe7bb3

See more details on using hashes here.

Provenance

The following attestation bundles were made for joserfc-1.7.5-py3-none-any.whl:

Publisher: pypi.yml on authlib/joserfc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.7.5 This release

2 files

1.7.4

2 files

1.7.3

2 files

1.7.2

2 files

1.7.1

2 files

1.7.0

2 files

1.6.8

2 files

1.6.7

2 files

1.6.5

2 files

1.6.4

2 files

1.6.3

2 files

1.6.2

2 files

1.6.1

2 files

1.6.0

2 files

1.5.0

2 files

1.4.3

2 files

1.4.2

2 files

1.4.1

2 files

1.4.0

2 files

1.3.5

2 files

1.3.4

2 files

1.3.3

2 files

1.3.2

2 files

1.3.1

2 files

1.3.0

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.0

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.12.0

2 files

0.11.1

2 files

0.11.0

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

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