Skip to content

Instantly share code, notes, and snippets.

@salrashid123
Created March 30, 2018 05:07
Show Gist options
  • Save salrashid123/fac334f091111b7b7b4c917e436d2edf to your computer and use it in GitHub Desktop.
Save salrashid123/fac334f091111b7b7b4c917e436d2edf to your computer and use it in GitHub Desktop.
svc4.py
audience = 'SystemC'
id_scope='scope1 scope2'
now = int(time.time())
exptime = now + 3600
id_token_claim =('{"iss":"%s","scope":"%s", "aud":"%s","exp":%s,"iat":%s}') %(client_id,id_scope,audience,exptime,now)
slist = resource.serviceAccounts().signJwt(name='projects/mineral-minutia-820/serviceAccounts/' + client_id,
body={'payload': id_token_claim })
resp = slist.execute()
signed_jwt = resp['signedJwt']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment