This commit is contained in:
chenyang
2022-07-01 07:30:07 +08:00
parent c7cc3cc5c4
commit 132432c7d5
3 changed files with 16 additions and 12 deletions
+1 -3
View File
@@ -3,6 +3,7 @@ from server_auth.models import MindUser
from django.contrib.auth import authenticate, login, logout
class AuthBackend(ModelBackend):
"""
login 方法会调用该方法
@@ -14,12 +15,9 @@ class AuthBackend(ModelBackend):
if user is not None and user.check_password(password):
return user
# 登录方式有多种
# 1、用户名密码登录:直接匹配数据库的用户名密码
def login():
pass
# 2、微信扫码登录:1、生成带标记的二维码 2、用户扫码 3、微信通知服务器端 4、服务器校验是否有注册,如果没有注册则新增用户 5、服务器通知前端界面