[英]Django : DRF Token based Authentication VS JSON Web Token
I am building a real world application where users will access the app primarily from Android, iOS devices as well as Desktops.我正在构建一个真实世界的应用程序,用户将主要从 Android、iOS 设备以及桌面访问该应用程序。
From my elementary research, I have realized that token based authentication mechanism is more better and elegant for client-server models as compared to session based authentication.从我的初步研究中,我意识到与基于会话的身份验证相比,基于令牌的身份验证机制对于客户端-服务器模型来说更好、更优雅。
In Django, I have found two popular ways to do this -在 Django 中,我找到了两种流行的方法来做到这一点 -
From what I understood, option 2] is an extension of 1] except that the Token is in the form of JSON(serialized).据我了解,选项 2] 是 1] 的扩展,除了 Token 是 JSON(序列化)的形式。 I would like to understand what other differences there are between option 1] and 2] and the advantages/disadvantages of choosing either.
我想了解选项 1] 和选项 2] 之间还有哪些其他差异以及选择两者的优缺点。
They both carrying out similar tasks with few differences.他们都执行相似的任务,但几乎没有区别。
DRF's builtin Token Authentication DRF 的内置令牌认证
DRF JWT Token Authentication DRF JWT 令牌认证
DRF's builtin Token Authentication DRF 的内置令牌认证
DRF JWT Token Authentication DRF JWT 令牌认证
DRF's builtin Token Authentication DRF 的内置令牌认证
DRF JWT Token Authentication DRF JWT 令牌认证
DRF's builtin Token Authentication DRF 的内置令牌认证
DRF JWT Token Authentication DRF JWT 令牌认证
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.