def mysql_login(self, user, pwd): enc_pwd = encode(pwd) admin = self.db.find_first_object_by(User, name=user, password=enc_pwd) if admin is None: log.warn("invalid user/pwd login: user=%s, encoded pwd=%s" % (user, enc_pwd)) return None token = self.__generate_api_token(admin) return {"token": token, "admin": admin}
def __mysql_login(self): data = { "provider": LOGIN_PROVIDER.DB, "username": request.form['username'], "password": encode(request.form['password']) } return self.__remote_login(data)
def __mysql_login(self): data = { "provider": LOGIN_PROVIDER.DB, "openid": request.form['username'], "username": request.form['username'], "password": encode(request.form['password']) } return self.__remote_login(data)