Loads credentials from a file identified via a search strategy known as
Application Default Credentials (ADC). The hope is to make auth "just work"
for someone working on Google-provided infrastructure or who has used Google
tooling to get started, such as the
gcloud command line tool.
A sequence of paths is consulted, which we describe here, with some abuse of
notation. ALL_CAPS represents the value of an environment variable and
is used in the spirit of a null coalescing operator.
1 2 3 4 5 6
GOOGLE_APPLICATION_CREDENTIALS CLOUDSDK_CONFIG/application_default_credentials.json # on Windows: (APPDATA %||% SystemDrive %||% C:)\gcloud\application_default_credentials.json # on not-Windows: ~/.config/gcloud/application_default_credentials.json
If the above search successfully identifies a JSON file, it is parsed and
ingested as a service account, an external account ("workload identity
federation"), or a user account. Literally, if the JSON describes a service
account, we call
credentials_service_account() and if it describes an
external account, we call
A character vector of scopes to request. Pick from those listed at https://developers.google.com/identity/protocols/oauth2/scopes.
For certain token flows, the
Additional arguments passed to all credential functions.
An optional subject claim. Use for a service account which has
been granted domain-wide authority by an administrator. Such delegation of
domain-wide authority means that the service account is permitted to act on
behalf of users, without their consent. Identify the user to impersonate
via their email, e.g.
1 2 3 4
## Not run: credentials_app_default() ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.