Attributes
- Companion
- trait
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
TokenProvider.type
Members list
Type members
Classlikes
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Value members
Concrete methods
Transforms a TokenProvider
in a cached version of itself that automatically refreshes the token given its expiration.
Transforms a TokenProvider
in a cached version of itself that automatically refreshes the token given its expiration.
Attributes
Retrieves an identity token using Google's metadata server for a specific audience.
Retrieves an identity token using Google's metadata server for a specific audience.
Identity tokens can be used for calling Cloud Run services.
'''Important!''' This method can only be run from within a workload container in GCP. The call will fail otherwise.
Attributes
- See also
Retrieves a workload service account token using Google's metadata server.
Retrieves a workload service account token using Google's metadata server.
You can then user the service account token to send authenticated requests to GCP services, such as Vertex-AI, Google Cloud Storage...
'''Important!''' This method can only be run from within a workload container in GCP. The call will fail otherwise.
Attributes
- See also
Retrieves a service account token from Google's OAuth API.
Retrieves a service account token from Google's OAuth API.
You can then user the service account token to send authenticated requests to GCP services, such as Vertex-AI, Google Cloud Storage...
Attributes
- See also
Retrieves a service account token from Google's OAuth API.
Retrieves a service account token from Google's OAuth API.
You can then user the service account token to send authenticated requests to GCP services, such as Vertex-AI, Google Cloud Storage...
Attributes
- See also
Retrieves a user account token from Google's OAuth API.
Retrieves a user account token from Google's OAuth API.
You can then user the user account token to send authenticated requests to GCP services, such as Vertex-AI, Google Cloud Storage...
Attributes
- See also
Retrieves a user account token from Google's OAuth API.
Retrieves a user account token from Google's OAuth API.
You can then user the user account token to send authenticated requests to GCP services, such as Vertex-AI, Google Cloud Storage...
Attributes
- See also
Retrieves a user account token from Google's OAuth API using the "Application Default Credentials" file.
Retrieves a user account token from Google's OAuth API using the "Application Default Credentials" file.
By default this file is located under ~/.config/cloud/application_default_credentials.json
(or %AppData%/gcloud/application_default_credentials.json
if running on Windows) and can be created using gcloud auth application-default login
or set GOOGLE_APPLICATION_CREDENTIALS
environment variable to override to another path.
You can then user the user account token to send authenticated requests to GCP services, such as Vertex-AI, Google Cloud Storage...
Attributes
- See also
Concrete fields
Suitable safety period for an token from the instance metadata.
Suitable safety period for an token from the instance metadata.
The GCP metadata endpoint caches tokens for 5 minutes until their expiry. The value here (4 minutes) should ensure a new token will be provided and have no risk of requests using an expired token.
Attributes
- See also