LogoSearch packages:      

Sourcecode: conduit version File versions

def gdata::service::GDataService::UpgradeToSessionToken (   self  )  [inherited]

Upgrades a single use AuthSub token to a session token.

Raises:
  NonAuthSubToken if the user's auth token is not an AuthSub token

Definition at line 420 of file service.py.

00420                                  :
    """Upgrades a single use AuthSub token to a session token.

    Raises:
      NonAuthSubToken if the user's auth token is not an AuthSub token
    """
   
    if not self.__auth_token.startswith(AUTHSUB_AUTH_LABEL):
      raise NonAuthSubToken

    response = self.handler.HttpRequest(self, 'GET', None, 
        AUTH_SERVER_HOST + '/accounts/AuthSubSessionToken', 
        extra_headers={'Authorization':self.__auth_token}, 
        content_type='application/x-www-form-urlencoded')

    response_body = response.read()
    if response.status == 200:
      for response_line in response_body.splitlines():
        if response_line.startswith('Token='):
          self.SetAuthSubToken(response_line.lstrip('Token='))

  def RevokeAuthSubToken(self):


Generated by  Doxygen 1.5.1   Back to index