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

def ubuntu_sso::auth::AuthorisationClient::get_access_token (   self  ) 

Get the access token from the keyring.

If no token is available in the keyring, `NoAccessToken` is raised.

Definition at line 162 of file auth.py.

00162                               :
        """Get the access token from the keyring.

        If no token is available in the keyring, `NoAccessToken` is raised.
        """
        logger.debug("Trying to fetch the token from the keyring")
        try:
            items = self._get_keyring_items()
        except (gnomekeyring.NoMatchError,
                gnomekeyring.DeniedError):
            logger.debug("Access token was not in the keyring")
            raise NoAccessToken("No access token found.")
        logger.debug("Access token successfully found in the keyring")
        return oauth.OAuthToken.from_string(items[0].secret)

    def clear_token(self):


Generated by  Doxygen 1.6.0   Back to index