def GenerateAuthSubUrl(next, scope, secure=False, session=True, request_url='https://www.google.com/accounts/AuthSubRequest', domain='default'):
 if secure:
  secure = 1
 else:
  secure = 0
 if session:
  session = 1
 else:
  session = 0
 request_params = urllib.urlencode({'next': next, 'scope': scope, 'secure': secure, 'session': session, 'hd': domain})
 if (request_url.find('?') == (-1)):
  return ('%s?%s' % (request_url, request_params))
 else:
  return ('%s&%s' % (request_url, request_params))

def GenerateAuthSubUrl ( next , scope , secure = False , session = True , request_url = 'https://www.google.com/accounts/AuthSubRequest' , domain = 'default' ) : if secure : secure = 1 else : secure = 0 if session : session = 1 else : session = 0 request_params = urllib . urlencode ( { 'next' : next , 'scope' : scope , 'secure' : secure , 'session' : session , 'hd' : domain } ) if ( request_url . find ( '?' ) == ( - 1 ) ) : return ( '%s?%s' % ( request_url , request_params ) ) else : return ( '%s&%s' % ( request_url , request_params ) )
generate a url at which the user will login and be redirected back .