Skip to main content

JOSE implementation in Python

Project description

# python-jose

A JOSE implementation in Python

[![Build Status](https://travis-ci.org/mpdavis/python-jose.svg?branch=master)](https://travis-ci.org/mpdavis/python-jose) [![Coverage Status](https://coveralls.io/repos/mpdavis/python-jose/badge.svg)](https://coveralls.io/r/mpdavis/python-jose)

## Principles

This is a JOSE implementation that is meant to be simple to use, both on and off of AppEngine.

## Examples

#### Signing tokens

```python
>>> from jose import jws
>>> signed = jws.sign({'a': 'b'}, 'secret', algorithm='HS256')
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhIjoiYiJ9.jiMyrsmD8AoHWeQgmxZ5yq8z0lXS67_QGs52AzC8Ru8'
```

#### Verifying token signatures

```python
>>> jws.verify(signed, 'secret', algorithms=['HS256'])
{'a': 'b'}
```

## Algorithms

The following algorithms are currently supported.

Algorithm Value | Digital Signature or MAC Algorithm
----------------|----------------------------
HS256 | HMAC using SHA-256 hash algorithm
HS384 | HMAC using SHA-384 hash algorithm
HS512 | HMAC using SHA-512 hash algorithm
RS256 | RSASSA using SHA-256 hash algorithm
RS384 | RSASSA using SHA-384 hash algorithm
RS512 | RSASSA using SHA-512 hash algorithm

## Thanks

This library is based heavily on the work of the guys over at [PyJWT](https://github.com/jpadilla/pyjwt).

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

python-jose-0.1.4.tar.gz (7.6 kB view details)

Uploaded Source

File details

Details for the file python-jose-0.1.4.tar.gz.

File metadata

  • Download URL: python-jose-0.1.4.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for python-jose-0.1.4.tar.gz
Algorithm Hash digest
SHA256 5ed8b6c840e2ce0f63f123a5d15e89b401b7e9ee46250e3c4fc84c0e669cceee
MD5 5d6b33d04c370a28f102470ef2a6802c
BLAKE2b-256 4e15c5b597eb7ccd8d2c6f198c4aed54f8ba832ca800dd9c7958c468608a83e8

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