跳转到主要内容

基于JSON Web Token认证的长期刷新令牌

项目描述

# django-rest-framework-jwt-refresh-token

为[django-rest-framework-jwt](https://github.com/GetBlimp/django-rest-framework-jwt)提供的插件,支持[长期运行刷新令牌](https://auth0.com/docs/refresh-token)。

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

最初由[Nick Lang](https://github.com/fxdgear)在[这个拉取请求](https://github.com/GetBlimp/django-rest-framework-jwt/pull/94)中完成。

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

## 使用方法

对于存储在数据库中的给定长期刷新令牌,向 委托 端点 POST 将返回新的 JWT 令牌。

`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..."}' `

## 更新日志

  • 0.5 / 2018-01-25
    • RefreshTokenViewSet 转换为 GenericViewSet 以利用模式生成

  • 0.4 / 2018-01-18
    • 公开撤销功能作为 API 动作

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

  • 0.3 / 2018-01-16
    • 添加 refresh_token.revoke() 来替换当前的刷新令牌

  • 0.2 / 2017-10-20
    • 添加与 Django 2.0 的兼容性

    • 删除低于 1.11 的 Django 支持

    • 删除低于 3.6 的 DRF 支持

  • 0.1.2 / 2016-01-28
    • 修复打包

  • 0.1.1 / 2016-01-28
    • 修复打包

  • 0.1.0 / 2016-01-28

项目详情


下载文件

为您的平台下载文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源分布

构建分布

djangorestframework_jwt_refresh_token-0.5-py2.py3-none-any.whl (23.0 kB 查看哈希值)

上传时间 Python 2 Python 3

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面