05-01 认证组件 认证组件 1、authentication """ 系统:session认证 rest_framework.authentication.SessionAuthentication ajax请求通过认证: cookie中要携带 sessionid、csrftoken,请求头中要携带 x-csrftoken 第三方:jw… Django-rest framework框架,第五章:三大认证组件 29 字 | 几秒读完
05-02 权限组件 权限组件 1、permission """ 系统: 1)AllowAny:允许所有用户,校验方法直接返回True 2)IsAuthenticated:只允许登录用户 必须request.user和request.user.is_authenticated都通过 3)IsAuthenticatedOrReadOnly:游… Django-rest framework框架,第五章:三大认证组件 26 字 | 几秒读完