Skip to main content

Long Refresh Tokens for JSON Web Token based authentication

Project description

# django-rest-framework-jwt-refresh-token
Plugin for django-rest-framework-jwt that supports long running refresh tokens https://auth0.com/docs/refresh-token

[Documentation](https://lock8.github.io/django-rest-framework-jwt-refresh-token/)


Work initially done by [Nick Lang](https://github.com/fxdgear)
from that [pull request](https://github.com/GetBlimp/django-rest-framework-jwt/pull/94).

[![Build Status](https://travis-ci.org/lock8/django-rest-framework-jwt-refresh-token.svg?branch=master)](https://travis-ci.org/lock8/django-rest-framework-jwt-refresh-token)
[![codecov.io](https://codecov.io/github/lock8/django-rest-framework-jwt-refresh-token/coverage.svg?branch=master)](https://codecov.io/github/lock8/django-rest-framework-jwt-refresh-token?branch=master)

## Usage

For a given long refresh token (stored in DB), POSTing to the `delegate` endpoint will return a new JWT token.

```bash
http POST client_id=app grant_type="urn:ietf:params:oauth:grant-type:jwt-bearer" refresh_token=<REFRESH_TOKEN> api_type=app http://localhost:8000/delegate/
'{"token": "your_jwt_token_...", "refresh_token": "your long running refresh token..."}'
```

## Changelog
- 0.4 / 2018-01-18
- Expose revoke functions as an API action

```POST /refresh_tokens/{key}/revoke/```

- 0.3 / 2018-01-16
- Add `refresh_token.revoke()` to replace the current refresh token

- 0.2 / 2017-10-20
- Add compatibility with Django 2.0
- Drop Django support below 1.11
- Drop DRF support below 3.6

- 0.1.2 / 2016-01-28
- Fix packaging

- 0.1.1 / 2016-01-28
- Fix packaging

- 0.1.0 / 2016-01-28
- Initial Release based on https://github.com/GetBlimp/django-rest-framework-jwt/pull/123

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

Built Distribution

djangorestframework_jwt_refresh_token-0.4-py2.py3-none-any.whl (22.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file djangorestframework-jwt-refresh-token-0.4.tar.gz.

File metadata

File hashes

Hashes for djangorestframework-jwt-refresh-token-0.4.tar.gz
Algorithm Hash digest
SHA256 ab2d758e4ce8f41ae653d13e177b9e14b6e10989313f738cd6cfc0afaebfdb29
MD5 f0ad02a040de76decb109fdf899539e5
BLAKE2b-256 393ba34036f61021cc155e3c230ad5fe1e34387e540b9b4aa564c95f11e63a23

See more details on using hashes here.

File details

Details for the file djangorestframework_jwt_refresh_token-0.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for djangorestframework_jwt_refresh_token-0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b57223525d5ec497be90a6252cbfdf9b6173ae067f1e2ffe19304e3aaf5215ce
MD5 30b6275b0f30df3d6b35c6b2fc54d08d
BLAKE2b-256 47f99169bd32e82e6a5be8e185f20eddfc76446020a93f33fae70d67897ab287

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