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

def openid::consumer::consumer::GenericConsumer::_requestAssociation (   self,
  endpoint,
  assoc_type,
  session_type 
) [private]

Make and process one association request to this endpoint's
OP endpoint URL.

@returns: An association object or None if the association
    processing failed.

@raises ServerError: when the remote OpenID server returns an error.

Reimplemented in openid::test::test_negotiation::ErrorRaisingConsumer.

Definition at line 1150 of file consumer.py.

01150                                                                      :
        """Make and process one association request to this endpoint's
        OP endpoint URL.

        @returns: An association object or None if the association
            processing failed.

        @raises ServerError: when the remote OpenID server returns an error.
        """
        assoc_session, args = self._createAssociateRequest(
            endpoint, assoc_type, session_type)

        try:
            response = self._makeKVPost(args, endpoint.server_url)
        except fetchers.HTTPFetchingError, why:
            oidutil.log('openid.associate request failed: %s' % (why[0],))
            return None

        try:
            assoc = self._extractAssociation(response, assoc_session)
        except KeyError, why:
            oidutil.log('Missing required parameter in response from %s: %s'
                        % (endpoint.server_url, why[0]))
            return None
        except ProtocolError, why:
            oidutil.log('Protocol error parsing response from %s: %s' % (
                endpoint.server_url, why[0]))
            return None
        else:
            return assoc

    def _createAssociateRequest(self, endpoint, assoc_type, session_type):


Generated by  Doxygen 1.6.0   Back to index