code: def _fetch_credentials(self, session):
          
  
          headers = {
              'Authorization': 'Bearer {0}'.format(self.access_token),
          }
  
          r = session.get("https://api.hubic.com/1.0/account/credentials",
                          headers=headers,
                          authenticated=False)
          response = r.json()
  
          # if we get an error here, the OpenStack SDK will take care to try
          # again for us.
          if 'error' in response:
              raise AuthorizationFailure()
  
          self.endpoint   = response['endpoint']
          self.auth_token = response['token']
docs: Fetch the endpoint URI and authorization token for this session.
  
          Those two information are the basis for all future calls to the Swift
          (OpenStack) API for the storage container.
  
          :param keystoneclient.Session session: The session object to use for
                                                 queries.
  
          :raises keystoneclient.exceptions.AuthorizationFailure: if something
                                                                  goes wrong.