Logo Search packages:      
Sourcecode: ubuntu-sso-client version File versions  Download package

def ubuntu_sso::auth::AuthorisationClient::retrieve_access_token (   self,
  store = False,
  verifier = None 
)

Retrieve the access token, once OAuth is done. This is a callback.

Definition at line 384 of file auth.py.

00384                                                                :
        """Retrieve the access token, once OAuth is done. This is a callback."""
        logger.debug("Access token callback from temp webserver")
        signature_method = oauth.OAuthSignatureMethod_PLAINTEXT()
        oauth_request = oauth.OAuthRequest.from_consumer_and_token(
            http_url=self.access_token_url,
            oauth_consumer=self.consumer,
            token=self.request_token)
        oauth_request.set_parameter("oauth_verifier", verifier)
        oauth_request.sign_request(
            signature_method, self.consumer, self.request_token)
        logger.debug("Retrieving access token from OAuth")
        access_token = self.make_token_request(oauth_request)
        if not access_token:
            logger.error("Failed to get access token.")
            if self.callback_denied is not None:
                self.callback_denied()
        else:
            if store:
                logger.debug("Storing access token in keyring")
                self.store_token(access_token)
            logger.debug("Calling the callback_parent")
            self.callback_parent(access_token)

    def ensure_access_token(self, description=None):


Generated by  Doxygen 1.6.0   Back to index