ncauth_logout.py
762 Bytes
import sqlite3
import hashlib
#import cgi,os,sys,json
from ncauth.ncauth_base import ncauth_base
class ncauth_logout(ncauth_base):
# def __init__(self, *args, **kwargs):
# #self.write('test')
# self.db=sqlite3.connect("ncauth/srvcnf.sqlite3")
# #self.db=sqlite3.connect("srvcnf.sqlite3")
# self.dbcursor=self.db.cursor()
def get(self):
self.write('<html><body><form action="/logout" method="post" id="logout"> '
'<input id="signout-btn" class="btn btn-blue" type="submit" value="Sign out">'
'</form></body></html>')
def post(self):
#self.set_secure_cookie("user", self.get_argument("name"))
self.clear_cookie("user")
self.redirect("/login")