I have the following test snippet:
def check(username, password):
if username == "b" and password == "password":
return True
return False
@route('/logout')
@route('/logout', method="POST")
def logout():
# template with a logout button
# this does redirect successfully, but this shouldn't happen
redirect('/after-login')
@route('/after-login')
@auth_basic(check)
def after_login():
return "hello"
@route('/login')
@route('/login', method="POST")
def login():
return template("views/login/login_page")
username = post_get('username')
password = post_get('password')
I'm attempting to log out of the system, but I haven't been able to find any resources on how to do this. Basically, I tried dir(response) and dir(request) and haven't found any functions that appears to set the session off (mostly attempting to reset cookies), unless I close the browser.