Expose a getCredentials
method
#169
Labels
priority: p1
Important issue which blocks shipping the next release. Will be fixed prior to next release.
The
private_key
andclient_email
properties of a service account JSON file are required for crypto operations, such as generating a signed URL. Example from@google-cloud/storage
: /~https://github.com/googleapis/nodejs-storage/blob/469530c744c42096e46f39f409272cca05eaf02a/src/file.js#L1646.Evidently, the GCP metadata server can return these values.
google-auth-library
is the most knowledgeable of the environment and authentication choices made by the user, and ideally would expose a method likeauthClient.getCredentials()
.This method would return the contents of the service account JSON key file, or if the user did not give a key file, i.e. they're on GCP, it would read the properties from the metadata server.
The text was updated successfully, but these errors were encountered: