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."],[[["\u003cp\u003eThis webpage provides documentation for the \u003ccode\u003eComputeCredential.Initializer\u003c/code\u003e class, which is part of the \u003ccode\u003eGoogle.Apis.Auth.OAuth2\u003c/code\u003e namespace within the Google.Apis.Auth.dll assembly.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eComputeCredential.Initializer\u003c/code\u003e class is an initializer for the Compute credential, utilizing \u003ccode\u003eComputeTokenUrl\u003c/code\u003e as the token server URL, with the option to override the host using the \u003ccode\u003eGCE_METADATA_HOST\u003c/code\u003e environment variable.\u003c/p\u003e\n"],["\u003cp\u003eThe initializer class inherits from \u003ccode\u003eServiceCredential.Initializer\u003c/code\u003e, inheriting members like \u003ccode\u003eTokenServerUrl\u003c/code\u003e, \u003ccode\u003eClock\u003c/code\u003e, \u003ccode\u003eAccessMethod\u003c/code\u003e, \u003ccode\u003eHttpClientFactory\u003c/code\u003e, \u003ccode\u003eQuotaProject\u003c/code\u003e, and \u003ccode\u003eScopes\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThere are three constructors for the \u003ccode\u003eInitializer\u003c/code\u003e class: a default constructor, one that accepts a \u003ccode\u003etokenUrl\u003c/code\u003e, and one that takes both \u003ccode\u003etokenUrl\u003c/code\u003e and \u003ccode\u003eoidcTokenUrl\u003c/code\u003e as parameters, with the latter allowing for optional host overriding via \u003ccode\u003eGCE_METADATA_HOST\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eOidcTokenUrl\u003c/code\u003e property, which is publicly accessible, is utilized to retrieve the designated OIDC token URL.\u003c/p\u003e\n"]]],[],null,[]]