What is the python programmatic alternative to the gcloud command line gcloud auth print-identity-token
?
I am trying to invoke Google Cloud Function by http trigger (only for auth users) and i need to pass the identity token in the Authentication header. I have method which works great when i run the code on GCP app engine. However, i struggle to find a way to get this identity token when i run the program on my own machine (where i can create the token with gcloud command line gcloud auth print-identity-token
)
I found how to create access-token according to this answer but i didn't managed to understand how can i create identity-token.
Thank you in advance!