Class ExternalAccountAuthorizedUserCredential (1.73.0)

public sealed class ExternalAccountAuthorizedUserCredential : ServiceCredential, IHttpUnsuccessfulResponseHandler, ICredential, IConfigurableHttpClientInitializer, ITokenAccessWithHeaders, ITokenAccess, IHttpExecuteInterceptor

OAuth2 credentials sourced using external identities through Workforce Identity Federation. Obtaining the initial access and refresh token can be done through the Google Cloud CLI.

Inheritance

object > ServiceCredential > ExternalAccountAuthorizedUserCredential

Namespace

Google.Apis.Auth.OAuth2

Assembly

Google.Apis.Auth.dll

Properties

Audience

public string Audience { get; }

This is the STS audience which contains the resource name for the workforce pool and the provider identifier in that pool. May be null as this value is kept for informational purposes only.

Property Value
Type Description
string

ClientId

public string ClientId { get; }

The client ID to use for basic authentication for refresh token requests. Must not be null or empty.

Property Value
Type Description
string

ClientSecret

public string ClientSecret { get; }

The client secret to use for basic authentication for refresh token requests. Must not be null or empty.

Property Value
Type Description
string

RefreshToken

public string RefreshToken { get; }

The refresh token used to refresh the access token that will be associated with the credential. Must not be null or empty.

Property Value
Type Description
string

TokenInfoUrl

public string TokenInfoUrl { get; }

Endpoint to retrieve information related to the user account, like email, username, etc. May be null as this value is kept for informational purposes only.

Property Value
Type Description
string

UniverseDomain

public string UniverseDomain { get; }

The universe domain this credential belogns to. Won't be null.

Property Value
Type Description
string

Methods

RequestAccessTokenAsync(CancellationToken)

public override Task<bool> RequestAccessTokenAsync(CancellationToken taskCancellationToken)
Parameter
Name Description
taskCancellationToken CancellationToken
Returns
Type Description
Taskbool
Overrides

ToGoogleCredential()

public GoogleCredential ToGoogleCredential()

Creates a GoogleCredential from this credential.

Returns
Type Description
GoogleCredential

Extension Method