Skip to main content

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: 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'}

License

Licensed under BSD. Please see LICENSE for licensing details.

Project 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-0.10.0.tar.gz (166.2 kB view details)

Uploaded Source

Built Distribution

joserfc-0.10.0-py3-none-any.whl (60.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: joserfc-0.10.0.tar.gz
  • Upload date:
  • Size: 166.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for joserfc-0.10.0.tar.gz
Algorithm Hash digest
SHA256 d1c16ff2179145e248fd67dbaa47bb5a3855f8754c64902dd09e2775e63bcd63
MD5 475e9d7be513d7e4ef06931aa2c1ebcd
BLAKE2b-256 958c095aaa5c157ccb6cb8ac4e241281ef0e6dcf3ee10cd95001bfe5834b99ed

See more details on using hashes here.

File details

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

File metadata

  • Download URL: joserfc-0.10.0-py3-none-any.whl
  • Upload date:
  • Size: 60.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for joserfc-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1b39bd9078d7f0087bfe694f96c9723c7a2fd63e5974f5efd805016319f2f50d
MD5 f85216a32a563a2b7400ac7de825c3e0
BLAKE2b-256 3dd0ac6b8e390ce1f03fd3ea26347b041ab7dc993fdf2c406121f98cf1b1d76e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page