weidwonder / django-jwt-session-auth Goto Github PK
View Code? Open in Web Editor NEWSimple auth-session implement by integrating jwt with django. Decouple django builtin user. U are free now!
Simple auth-session implement by integrating jwt with django. Decouple django builtin user. U are free now!
说实话,网络上关于这个问题的信息不多,所以很认真地看了你的源码,现在给你的评价吧,有一些原理你是讲通了,但是代码没写对,没法用.比如说,jwt_login和login_requied根本就不对应,如何检查session?
from django_jwt_session_auth import jwt_login
token = jwt_login(your_user, request, expire=your_expire_time_in_sec) # also you can set default expire time in settings
这个登陆的示例, you_user 指代的是什么意思? 另外 这里返回的 token, 怎么放到header里面去给用户?
def _get_token(self, jwt_val): """get token from jwt_val """ jwt_val = jwt_val.decode('utf-8') #在python3的环境下 需要添加这一句才能正常执行获取到token
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.