Esempio n. 1
0
 def _whoami_error(self, ssologin, e):
     logging.error("whoami error '%s'" % e)
     # HACK: clear the token from the keyring assuming that it expired
     #       or got deauthorized by the user on the website
     # this really should be done by ubuntu-sso-client itself
     import lazr.restfulclient.errors
     errortype = lazr.restfulclient.errors.HTTPError
     if (type(e) == errortype):
         LOG.warn("authentication error, resetting token and retrying")
         clear_token_from_ubuntu_sso(self.appname)
         self._share_inventory(False)
         return
Esempio n. 2
0
 def _whoami_error(self, ssologin, e):
     logging.error("whoami error '%s'" % e)
     # HACK: clear the token from the keyring assuming that it expired
     #       or got deauthorized by the user on the website
     # this really should be done by ubuntu-sso-client itself
     import lazr.restfulclient.errors
     errortype = lazr.restfulclient.errors.HTTPError
     if (type(e) == errortype):
         LOG.warn("authentication error, resetting token and retrying")
         clear_token_from_ubuntu_sso(self.appname)
         self._share_inventory(False)
         return
Esempio n. 3
0
 def clear_token(self):
     clear_token_from_ubuntu_sso(SOFTWARE_CENTER_NAME_KEYRING)
 def clear_token(self):
     clear_token_from_ubuntu_sso(SOFTWARE_CENTER_NAME_KEYRING)