コード例 #1
0
 def authenticate(self, username=None, password=None):
     user = User.objects(username=username).first()
     if user:
         if password and user.check_password(password):
             return user
     return None
コード例 #2
0
 def authenticate(self, username=None, password=None):
     user = User.objects(username=username).first()
     if user:
         if password and user.check_password(password):
             return user
     return None