+ # save username into a cookie if parent was form base auth
+ if auth_type == 'password':
+ cherrypy.response.cookie[USERNAME_COOKIE] = username
+ cherrypy.response.cookie[USERNAME_COOKIE]['path'] = \
+ cherrypy.config.get('base.mount', '/')
+ cherrypy.response.cookie[USERNAME_COOKIE]['secure'] = True
+ cherrypy.response.cookie[USERNAME_COOKIE]['httponly'] = True
+ # 15 days
+ cherrypy.response.cookie[USERNAME_COOKIE]['max-age'] = 1296000
+