摘要: #注意: 认证-->权限-->频率 第一步认证没通过的话就不会到权限,权限没通过就不会到频率 一、自定义认证类 1 使用 -定义一个类,继承BaseAuthentication class LoginAuth(BaseAuthentication): def authenticate(self, r 阅读全文
posted @ 2020-11-10 21:36 1024bits 阅读(553) 评论(0) 推荐(0) 编辑
摘要: 一、drf认证功能源码分析 1 APIView 》dispatch 》self.initial(request, *args, **kwargs)--》self.perform_authentication(request) 》Request.user >self._authenticate(sel 阅读全文
posted @ 2020-11-10 21:29 1024bits 阅读(184) 评论(0) 推荐(0) 编辑