rtCommon.webHttpHandlers
- This module provides the callback handlers that the web server will utilize
when handling and rendering html page reqeusts.
Module Contents
Classes
Generic web handler object that is initialized with the page name to render when called. |
|
Renders a login page and authenticates users. Sets a secure-cookie to remeber authenticated users. |
|
Clears the secure-cookie so that users will need to re-authenticate. |
Functions
|
|
|
Attributes
- rtCommon.webHttpHandlers.maxDaysLoginCookieValid = 0.5
- class rtCommon.webHttpHandlers.HttpHandler
Bases:
tornado.web.RequestHandler
Generic web handler object that is initialized with the page name to render when called.
- initialize(htmlDir, page)
- get_current_user()
- get()
Handle a web GET request by returning the appropriate web content to render
- class rtCommon.webHttpHandlers.LoginHandler
Bases:
tornado.web.RequestHandler
Renders a login page and authenticates users. Sets a secure-cookie to remeber authenticated users.
- loginAttempts
- loginRetryDelay = 10
- initialize(htmlDir, page, testMode)
- get()
- post()
- checkRetry(user)
Keep a dictionary with one entry per username. Any user not in the passwd file will be entered as ‘invalid_user’. Record login failure count and timestamp for when the next retry is allowed. Reset failed retry count on successful login. Return message with how many seconds until next login attempt is allowed.
- class rtCommon.webHttpHandlers.LogoutHandler
Bases:
tornado.web.RequestHandler
Clears the secure-cookie so that users will need to re-authenticate.
- initialize()
- get()
- rtCommon.webHttpHandlers.loadPasswdFile(filename)
- rtCommon.webHttpHandlers.storePasswdFile(filename, passwdDict)