X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=ipsilon%2Fproviders%2Fsaml2idp.py;h=d4f3a310a7c2af1dc1d9a4208fae9ef9acc856de;hb=1e985d549481a2ca0e03440e410912b4e2b49271;hp=2e6f3465360b3e99c5d5e5553ef63d7f5e24b8d5;hpb=f803c90da1873a1bec99635868e347b66b8987b3;p=cascardo%2Fipsilon.git diff --git a/ipsilon/providers/saml2idp.py b/ipsilon/providers/saml2idp.py index 2e6f346..d4f3a31 100644 --- a/ipsilon/providers/saml2idp.py +++ b/ipsilon/providers/saml2idp.py @@ -112,7 +112,7 @@ class Continue(AuthenticateRequest): self.debug('Continue auth for %s' % user.name) if 'saml2_request' not in transdata: - self.debug("Couldn't find Request dump?!") + self.error("Couldn't find Request dump in transaction?!") # TODO: Return to SP with auth failed error raise cherrypy.HTTPError(400) dump = transdata['saml2_request'] @@ -120,10 +120,10 @@ class Continue(AuthenticateRequest): try: login = self.cfg.idp.get_login_handler(dump) except Exception, e: # pylint: disable=broad-except - self.debug('Failed to load status from dump: %r' % e) + self.error('Failed to load login status from dump: %r' % e) if not login: - self.debug("Empty Request dump?!") + self.error("Empty login Request dump?!") # TODO: Return to SP with auth failed error raise cherrypy.HTTPError(400) @@ -354,18 +354,12 @@ Provides SAML 2.0 authentication infrastructure. """ self.sessionfactory = SAMLSessionFactory( database_url=self.get_config_value('session database url') ) - # Schedule cleanups - # pylint: disable=protected-access - bt = cherrypy.process.plugins.BackgroundTask( - 60, self.sessionfactory._ss.remove_expired_sessions - ) - bt.start() # Init IDP data try: idp = IdentityProvider(self, sessionfactory=self.sessionfactory) except Exception, e: # pylint: disable=broad-except - self.debug('Failed to init SAML2 provider: %r' % e) + self.error('Failed to init SAML2 provider: %r' % e) return None self._root.logout.add_handler(self.name, self.idp_initiated_logout) @@ -381,7 +375,7 @@ Provides SAML 2.0 authentication infrastructure. """ try: idp.add_provider(sp) except Exception, e: # pylint: disable=broad-except - self.debug('Failed to add SP %s: %r' % (sp['name'], e)) + self.error('Failed to add SP %s: %r' % (sp['name'], e)) return idp