Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

djangorestframework-simplejwt-captcha

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

djangorestframework-simplejwt-captcha

A minimal JSON Web Token

  • 1.1.6
  • PyPI
  • Socket score

Maintainers
1

Simple JWT

License

Abstract

Simple JWT is a JSON Web Token authentication plugin for the Django REST

Framework http://www.django-rest-framework.org/

For full documentation, visit django-rest-framework-simplejwt.readthedocs.io https://django-rest-framework-simplejwt.readthedocs.io/en/latest/

二次开发的Simple JWT

Installation

You can use this command to install this package:

pip3 install djangorestframework_simplejwt_captcha

Usage

from rest_framework_simplejwt.views import TokenObtainPairView,TokenRefreshView,ImageInfo

urlpatterns = [
    path('api/token/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
    path('api/token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
    path('api/images_captcha/',ImageInfo.as_view(), name='images_captcha'),

]
  • api/images_captcha 是获取图片base64和uuid
  • api/token/是登录获取jwt
传入4个参数
- username
- password
- uuid          # 获取上一个api 的uuid
- captcha       # 图片验证码
  • api/token/refresh 刷新token

For more information, see here

验证码有效期是120秒

https://github.com/SimpleJWT/django-rest-framework-simplejwt/issues/207

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc