Ejemplo n.º 1
0
 def _cbGoodAuthentication(self, avatarId, credentials):
     if avatarId not in self.successfulCredentials:
         self.successfulCredentials[avatarId] = []
     self.successfulCredentials[avatarId].append(credentials)
     if self.areDone(avatarId):
         del self.successfulCredentials[avatarId]
         return avatarId
     else:
         raise error.NotEnoughAuthentication()
Ejemplo n.º 2
0
 def _cbGoodAuthentication(self, avatarId, credentials):
     """
     Called if a checker has verified the credentials.  We call our
     L{areDone} method to see if the whole of the successful authentications
     are enough.  If they are, we return the avatar ID returned by the first
     checker.
     """
     if avatarId not in self.successfulCredentials:
         self.successfulCredentials[avatarId] = []
     self.successfulCredentials[avatarId].append(credentials)
     if self.areDone(avatarId):
         del self.successfulCredentials[avatarId]
         return avatarId
     else:
         raise error.NotEnoughAuthentication()