Last active
December 19, 2015 07:49
-
-
Save srhopkins/5921215 to your computer and use it in GitHub Desktop.
cherrypy.tools.session_auth.check_username_and_password
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Roll your own check_user, pretty_login, logout, and Root functions accordingly. | |
_cp_config={'/':{'tools.sessions.on':True, | |
'tools.sessions.storage_type':'file', | |
'tools.sessions.storage_path':'./', | |
'tools.sessions.timeout':60, | |
'tools.session_auth.on':True, | |
'tools.session_auth.login_screen':pretty_login, | |
'tools.session_auth.check_username_and_password':check_user, | |
} | |
} | |
cherrypy.config.update({'server.socket_host':'0.0.0.0', | |
'server.socket_port':80}) | |
cherrypy.quickstart(Root(),'/',config=_cp_config) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment