public class Initializer : ServiceCredential.Initializer
An initializer class for the Compute credential. It uses ComputeTokenUrl
as the token server URL (optionally overriding the host using the GCE_METADATA_HOST environment variable).
public Initializer(string tokenUrl, string oidcTokenUrl)
Constructs a new initializer using the given token URL
and OIDC token URL (optionally overriding the host using the GCE_METADATA_HOST environment variable).
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["This webpage provides documentation for the `ComputeCredential.Initializer` class, which is part of the `Google.Apis.Auth.OAuth2` namespace within the Google.Apis.Auth.dll assembly."],["The `ComputeCredential.Initializer` class is an initializer for the Compute credential, utilizing `ComputeTokenUrl` as the token server URL, with the option to override the host using the `GCE_METADATA_HOST` environment variable."],["The initializer class inherits from `ServiceCredential.Initializer`, inheriting members like `TokenServerUrl`, `Clock`, `AccessMethod`, `HttpClientFactory`, `QuotaProject`, and `Scopes`."],["There are three constructors for the `Initializer` class: a default constructor, one that accepts a `tokenUrl`, and one that takes both `tokenUrl` and `oidcTokenUrl` as parameters, with the latter allowing for optional host overriding via `GCE_METADATA_HOST`."],["The `OidcTokenUrl` property, which is publicly accessible, is utilized to retrieve the designated OIDC token URL."]]],[]]