def get_id_token():
 params = urllib.urlencode({'grant_type': 'urn:ietf:params:oauth:grant-type:jwt-bearer', 'assertion': generate_jwt()})
 headers = {'Content-Type': 'application/x-www-form-urlencoded'}
 conn = httplib.HTTPSConnection('www.googleapis.com')
 conn.request('POST', '/oauth2/v4/token', params, headers)
 res = json.loads(conn.getresponse().read())
 conn.close()
 return res['id_token']

def get_id_token ( ) : params = urllib . urlencode ( { 'grant_type' : 'urn:ietf:params:oauth:grant-type:jwt-bearer' , 'assertion' : generate_jwt ( ) } ) headers = { 'Content-Type' : 'application/x-www-form-urlencoded' } conn = httplib . HTTPSConnection ( 'www.googleapis.com' ) conn . request ( 'POST' , '/oauth2/v4/token' , params , headers ) res = json . loads ( conn . getresponse ( ) . read ( ) ) conn . close ( ) return res [ 'id_token' ]
request a google id token using a jwt .