#60 Store login failure error messages in the transaction
Closed 7 years ago by puiterwijk. Opened 7 years ago by rcritten.
rcritten/ipsilon login_errmsg  into  master

file modified
+2
@@ -169,6 +169,8 @@ 

      def auth_failed(self, trans, message=None):

          # try with next module

          next_login = self.next_login()

+         data = {'message': message}

+         trans.store(data)

          if next_login:

              return self.redirect_to_path(next_login.path, trans)

  

@@ -110,8 +110,12 @@ 

  

          if user.is_anonymous:

              self.debug("User is marked anonymous?!")

+             message = transdata.get('message')

+             if message is not None:

+                 data = {'message': None}

+                 self.trans.store(data)

              # TODO: Return to SP with auth failed error

-             raise cherrypy.HTTPError(401)

+             raise cherrypy.HTTPError(401, message)

  

          self.debug('Continue auth for %s' % user.name)