Skip to main content

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

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.3.0.tar.gz (38.6 kB view details)

Uploaded Source

Built Distribution

joserfc-0.3.0-py3-none-any.whl (52.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: joserfc-0.3.0.tar.gz
  • Upload date:
  • Size: 38.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for joserfc-0.3.0.tar.gz
Algorithm Hash digest
SHA256 264148f8ff09bd1130845d988ea7d6150b7bab56dbf1c5809e0695feb5a2a414
MD5 d36b6d1ed7b43a0a9e5be0b418761df0
BLAKE2b-256 9dbaeb0a080dd189e041d5085fd28ac2c145a8bdd4c20a1177dbc210d3631ea1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: joserfc-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 52.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for joserfc-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7da463f0b6e29404365e2b10d0933fb6ddb193535333affe81ab029ea4bb2892
MD5 696dae8470ee7563d1b1686c128375f6
BLAKE2b-256 8651db8870c5be17d8aa4b733760b71fbc96d491e5719cdfa32a713de919db2a

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