def do_login(self, username, password): password = Sha256Hash(password, SALT_KEY, 2048).toBase64() print password user = _subject() session = user.getSession() if not user.isAuthenticated(): token = UsernamePasswordToken(username, password) token.setRememberMe(True) try: user.login(token) except IncorrectCredentialsException, e: return False
def get(self): _subject().logout() return redirect(url_for("index"))
def get(self): user = _subject() return render_template("login.html", currentUser=user)