Ignore:
Timestamp:
06/05/09 09:05:09 (11 years ago)
Author:
pjkersha
Message:

Added additional debug logging and improved error handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/wsgi/openid/provider/authninterface/basic.py

    r5223 r5254  
    1717log = logging.getLogger(__name__) 
    1818 
    19 from ndg.security.server.wsgi.openid.provider import AbstractAuthNInterface 
     19from ndg.security.server.wsgi.openid.provider import AbstractAuthNInterface, \ 
     20    AuthNInterfaceInvalidCredentials, AuthNInterfaceRetrieveError, \ 
     21    AuthNInterfaceConfigError, AuthNInterfaceUsername2IdentifierMismatch 
    2022  
    2123     
     
    8284         
    8385        @raise AuthNInterfaceInvalidCredentials: invalid username/password 
     86        @raise AuthNInterfaceUsername2IdentifierMismatch: no OpenID matching 
     87        the given username 
    8488        """ 
    8589        if self._userCreds.get(username) != password: 
     
    152156        self._client = WSGISessionManagerClient(**prop) 
    153157         
     158        # This is set at login 
     159        self.sessionId = None 
    154160         
    155161    def logon(self, environ, userIdentifier, username, password): 
     
    175181        try: 
    176182            self._client.environ = environ 
    177             self.sessionId = self._client.connect(username,  
    178                                                   passphrase=password)[-1] 
     183            connectResp = self._client.connect(username, passphrase=password) 
     184            log.debug("Connected to Session Manager with: %s", connectResp) 
     185             
     186            self.sessionId = connectResp[-1] 
    179187             
    180188        except AuthNServiceInvalidCredentials, e: 
Note: See TracChangeset for help on using the changeset viewer.