New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: Support authentication with service accounts #39
Comments
Can you help me understand this use case a little better? When would you like to use this function compared to calling |
The use case is having the equivalent of load_user_credentials, but for service auth. Example usage; https://github.com/isidentical/gdrivefs/blob/6993923963368726bf18112766e8d4d2574756f4/gdrivefs/core.py#L100-L110 |
OK. That makes some sense to me (one library to do all auth). When I have some time I'll take a closer look at your PR. |
Thanks! |
It's actually been on my wishlist for a while to have a single function that loads any type of credentials file. The JSON includes a type field for this purpose https://github.com/pydata/pydata-google-auth/blob/master/pydata_google_auth/cache.py#L119 What if we add a generic |
Wouldn't it make sense to have this separately, and maybe use the |
Yeah, that's fair. Doesn't hurt to have the explicit function. |
Service accounts use a different credentials class (
google.oauth2.service_account.Credentials
) and mostly used within a file that is expored from GCP console. It would be nice to have apydata_google_auth.load_service_account_credentials(path: os.PathLike) -> Credentials
method which does the initalization.The text was updated successfully, but these errors were encountered: