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"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-05 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."]]],[]]