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).
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
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
python-jose-0.1.8.tar.gz
(7.7 kB
view details)
File details
Details for the file python-jose-0.1.8.tar.gz
.
File metadata
- Download URL: python-jose-0.1.8.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fd7a6d133b194832bc0aea89558621cc7555634cb93256073c644980d12db64 |
|
MD5 | 029b09c48e55ec8ea4be17dc7f5d119c |
|
BLAKE2b-256 | 2f44d92bda4f5b3416cdeebc1317aa37cc7371473107a6bdc3cb2462011922b8 |