Logo Search packages:      
Sourcecode: python-openid version File versions

def openid::consumer::consumer::GenericConsumer::_doIdRes (   self,
  message,
  endpoint 
) [private]

Handle id_res responses that are not cancellations of
immediate mode requests.

@param message: the response paramaters.
@param endpoint: the discovered endpoint object. May be None.

@raises ProtocolError: If the message contents are not
    well-formed according to the OpenID specification. This
    includes missing fields or not signing fields that should
    be signed.

@raises DiscoveryFailure: If the subject of the id_res message
    does not match the supplied endpoint, and discovery on the
    identifier in the message fails (this should only happen
    when using OpenID 2)

@returntype: L{Response}

Definition at line 647 of file consumer.py.

00647                                          :
        """Handle id_res responses that are not cancellations of
        immediate mode requests.

        @param message: the response paramaters.
        @param endpoint: the discovered endpoint object. May be None.

        @raises ProtocolError: If the message contents are not
            well-formed according to the OpenID specification. This
            includes missing fields or not signing fields that should
            be signed.

        @raises DiscoveryFailure: If the subject of the id_res message
            does not match the supplied endpoint, and discovery on the
            identifier in the message fails (this should only happen
            when using OpenID 2)

        @returntype: L{Response}
        """
        signed_list_str = message.getArg(OPENID_NS, 'signed')
        if signed_list_str is None:
            raise ProtocolError("Response missing signed list")

        signed_list = signed_list_str.split(',')

        # Checks for presence of appropriate fields (and checks
        # signed list fields)
        self._idResCheckForFields(message, signed_list)

        # Verify discovery information:
        endpoint = self._verifyDiscoveryResults(message, endpoint)

        self._idResCheckSignature(message, endpoint.server_url)

        response_identity = message.getArg(OPENID_NS, 'identity')

        # Will raise a ProtocolError if the nonce is bad
        self._idResCheckNonce(message, endpoint)

        signed_fields = ["openid." + s for s in signed_list]
        return SuccessResponse(endpoint, message, signed_fields)

    def _idResGetNonceOpenID1(self, message, endpoint):


Generated by  Doxygen 1.6.0   Back to index