Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

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](


Work initially done by [Nick Lang]( from that [pull request](

[![Build Status](]( [![](](

## 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.5 / 2018-01-25
    • Make RefreshTokenViewSet a GenericViewSet to take advantage of schema generation
  • 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

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(23.0 kB) Copy SHA256 Hash SHA256
3.5 Wheel Jan 25, 2018
(5.1 kB) Copy SHA256 Hash SHA256
Source Jan 25, 2018

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting