JOSE implementation in Python
Project description
# python-jose
A JOSE implementation in Python
[![Build Status](https://travis-ci.org/mpdavis/jose.svg?branch=master)](https://travis-ci.org/mpdavis/jose) [![Coverage Status](https://coveralls.io/repos/mpdavis/jose/badge.svg)](https://coveralls.io/r/mpdavis/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/jose.svg?branch=master)](https://travis-ci.org/mpdavis/jose) [![Coverage Status](https://coveralls.io/repos/mpdavis/jose/badge.svg)](https://coveralls.io/r/mpdavis/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.3.tar.gz
(6.8 kB
view details)
File details
Details for the file python-jose-0.1.3.tar.gz
.
File metadata
- Download URL: python-jose-0.1.3.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c916c895a3295a765b6c6fb0c04dc721b825dec93c8c6386ba672d0872397547 |
|
MD5 | 2f4ab5b24cce112f560ce65d3c0747a6 |
|
BLAKE2b-256 | c87fd4fc8adfa3091f061a60017ab5f0fe5aefcc40b3c7fe528d83bc7c741fb6 |