]> git.ipfire.org Git - people/ms/webapp.git/blob - application/auth.py
Split into many seperate files.
[people/ms/webapp.git] / application / auth.py
1 #!/usr/bin/python
2
3 from handlers import BaseHandler
4
5 class LoginHandler(BaseHandler):
6 def get(self):
7 self.render("login.html", footer=self.footer())
8
9 def post(self):
10 self.set_secure_cookie("user", self.get_argument("user"))
11 self.redirect("/")
12
13
14 class LogoutHandler(BaseHandler):
15 def get(self):
16 self.clear_cookie("user")
17 self.render("logout.html", footer=self.footer())