google-auth-library-python
google-auth-library-python copied to clipboard
Property to identify the account a credential is representing
We are working on updating some of our code to use google.auth.impersonated_credentials in place of google.oauth2.service_account credentials. Some of our code needs to know the email address associated with credentials it's using. Currently our code looks at the my_creds.signer_email property. With impersonated credentials we have to look at my_creds._target_principal. It would be nice if the base Credentials class implemented a way to get the email address directly and each implementation handled returning it correctly.