Exemplo n.º 1
0
    def _HandleStore2Fault(self, callback, errback, soap_response, user_data):
        error = OfflineMessagesBoxError.from_fault(soap_response.fault)
        if error == OfflineMessagesBoxError.AUTHENTICATION_FAILED:
            auth_policy = soap_response.fault.detail.findtext("./oim:RequiredAuthPolicy")
            lock_key_challenge = soap_response.fault.detail.findtext("./oim:LockKeyChallenge")

            if lock_key_challenge:
                self.__oim.set_lock_key(_msn_challenge(lock_key_challenge))
            if auth_policy:
                self._sso.DiscardSecurityTokens([LiveService.MESSENGER_SECURE])
                self.Store2(callback, errback, *user_data)
                return True

        return False
Exemplo n.º 2
0
    def __store2_errback(self, error_code,  auth_policy, lock_key_challenge):
        if error_code == OfflineMessagesBoxError.AUTHENTICATION_FAILED:
            if lock_key_challenge != None:
                self.__oim.set_lock_key(_msn_challenge(lock_key_challenge))
            if auth_policy != None:
                self._client._sso.DiscardSecurityTokens([LiveService.CONTACTS])
                self._client._sso.RequestMultipleSecurityTokens((self.execute, ), None, LiveService.CONTACTS)
                return

            self.execute()
            return

        errback = self._errback
        errback[0](error_code, *errback[1:])
Exemplo n.º 3
0
    def __store2_errback(self, error_code, auth_policy, lock_key_challenge):
        if error_code == OfflineMessagesBoxError.AUTHENTICATION_FAILED:
            if lock_key_challenge != None:
                self.__oim.set_lock_key(_msn_challenge(lock_key_challenge))
            if auth_policy != None:
                self._client._sso.DiscardSecurityTokens([LiveService.CONTACTS])
                self._client._sso.RequestMultipleSecurityTokens(
                    (self.execute, ), None, LiveService.CONTACTS)
                return

            self.execute()
            return

        errback = self._errback
        errback[0](error_code, *errback[1:])