Move user attribute storage into session functions
[cascardo/ipsilon.git] / ipsilon / login / authkrb.py
index c67b93b..af659e7 100755 (executable)
@@ -52,7 +52,7 @@ class KrbError(LoginPageBase):
         # If we have no negotiate header return whatever mod_auth_kerb
         # generated and wait for the next request
 
-        if not 'WWW-Authenticate' in cherrypy.request.headers:
+        if 'WWW-Authenticate' not in cherrypy.request.headers:
             cherrypy.response.status = 401
 
             if self.lm.next_login:
@@ -82,6 +82,7 @@ plugin for actual authentication. """
         self.page = Krb(site, self)
         self.page.__dict__['negotiate'] = KrbAuth(site, self)
         self.page.__dict__['unauthorized'] = KrbError(site, self)
+        self.page.__dict__['failed'] = KrbError(site, self)
         return self.page
 
 
@@ -101,6 +102,7 @@ CONF_TEMPLATE = """
   Require valid-user
 
   ErrorDocument 401 /${instance}/login/krb/unauthorized
+  ErrorDocument 500 /${instance}/login/krb/failed
 </Location>
 """