1.73.0 (latest) 1.69.0 1.68.0 1.60.0 1.59.0 1.55.0 1.50.0

## Classes

### [AccessTokenWithHeaders](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.AccessTokenWithHeaders.md.txt)

Represents an access token that can be used to authorize a request.
The token might be accompanied by extra information that should be sent
in the form of headers.

### [AccessTokenWithHeaders.Builder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.AccessTokenWithHeaders.Builder.md.txt)

Builder class for [AccessTokenWithHeaders](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.AccessTokenWithHeaders.md.txt) to simplify common scenarios.

### [AuthorizationCodeInstalledApp](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.AuthorizationCodeInstalledApp.md.txt)

Thread-safe OAuth 2.0 authorization code flow for an installed application that persists end-user credentials.

### [AwsExternalAccountCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.AwsExternalAccountCredential.md.txt)

AWS credentials as described in
<https://google.aip.dev/auth/4117#determining-the-subject-token-in-aws>.

### [BearerToken](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.BearerToken.md.txt)

OAuth 2.0 helper for accessing protected resources using the Bearer token as specified in
<http://tools.ietf.org/html/rfc6750>.

### [BearerToken.AuthorizationHeaderAccessMethod](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.BearerToken.AuthorizationHeaderAccessMethod.md.txt)

Thread-safe OAuth 2.0 method for accessing protected resources using the Authorization header as specified
in <http://tools.ietf.org/html/rfc6750#section-2.1>.

### [BearerToken.QueryParameterAccessMethod](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.BearerToken.QueryParameterAccessMethod.md.txt)

Obsolete.
Thread-safe OAuth 2.0 method for accessing protected resources using an `access_token` query parameter
as specified in <http://tools.ietf.org/html/rfc6750#section-2.3>.
This access method is being made obsolete. Please read here for more up to date information:
`https://developers.google.com/identity/protocols/oauth2/index.html#4.-send-the-access-token-to-an-api.`.
Please use [BearerToken.AuthorizationHeaderAccessMethod](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.BearerToken.AuthorizationHeaderAccessMethod.md.txt) instead.

### [ClientSecrets](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ClientSecrets.md.txt)

Client credential details for installed and web applications.

### [ComputeCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ComputeCredential.md.txt)

Google OAuth 2.0 credential for accessing protected resources using an access token. The Google OAuth 2.0
Authorization Server supports server-to-server interactions such as those between a web application and Google
Cloud Storage. The requesting application has to prove its own identity to gain access to an API, and an
end-user doesn't have to be involved.


More details about Compute Engine authentication is available at:
<https://cloud.google.com/compute/docs/authentication>.

<br />

### [ComputeCredential.Initializer](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ComputeCredential.Initializer.md.txt)

An initializer class for the Compute credential. It uses Google.Apis.Auth.OAuth2.GoogleAuthConsts.EffectiveComputeTokenUrl
as the token server URL (optionally overriding the host using the GCE_METADATA_HOST environment variable).

### [CredentialFactory](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.CredentialFactory.md.txt)

A Google credential factory.

### [ExternalAccountAuthorizedUserCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ExternalAccountAuthorizedUserCredential.md.txt)

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.

### [ExternalAccountCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ExternalAccountCredential.md.txt)

Base class for external account credentials.

### [ExternalAccountCredential.Initializer](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ExternalAccountCredential.Initializer.md.txt)

Initializer for [ExternalAccountCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ExternalAccountCredential.md.txt).

### [FileSourcedExternalAccountCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.FileSourcedExternalAccountCredential.md.txt)

File-sourced credentials as described in
<https://google.aip.dev/auth/4117#determining-the-subject-token-in-file-sourced-credentials>.

### [GoogleAuthConsts](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.GoogleAuthConsts.md.txt)

Google OAuth2 constants.
Canonical source for these URLs is: <https://accounts.google.com/.well-known/openid-configuration>

### [GoogleClientSecrets](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.GoogleClientSecrets.md.txt)

OAuth 2.0 client secrets model as specified in <https://cloud.google.com/console/>.

### [GoogleCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.GoogleCredential.md.txt)

Credential for authorizing calls using OAuth 2.0.
It is a convenience wrapper that allows handling of different types of
credentials (like [ServiceAccountCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ServiceAccountCredential.md.txt), [ComputeCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ComputeCredential.md.txt)
or [UserCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.UserCredential.md.txt)) in a unified way.


See [GetApplicationDefaultAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.GoogleCredential.md.txt#Google_Apis_Auth_OAuth2_GoogleCredential_GetApplicationDefaultAsync_System_Threading_CancellationToken_) for the credential retrieval logic.

<br />

### [GoogleWebAuthorizationBroker](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.GoogleWebAuthorizationBroker.md.txt)

A helper utility to manage the authorization code flow.

### [ImpersonatedCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ImpersonatedCredential.md.txt)

Allows a service account or user credential to impersonate a service account.
See <https://cloud.google.com/iam/docs/creating-short-lived-service-account-credentials>
and <https://cloud.google.com/iam/docs/impersonating-service-accounts>
for more information.

### [ImpersonatedCredential.Initializer](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ImpersonatedCredential.Initializer.md.txt)

An initializer class for the impersonated credential.

### [JsonCredentialParameters](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.JsonCredentialParameters.md.txt)

Holder for credential parameters read from JSON credential file.
Fields are union of parameters for all supported credential types.

### [JsonCredentialParameters.CredentialSource](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.JsonCredentialParameters.CredentialSource.md.txt)

Holder for the credential source parameters associated to an external account credentials.

### [JsonCredentialParameters.CredentialSource.SubjectTokenFormat](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.JsonCredentialParameters.CredentialSource.SubjectTokenFormat.md.txt)

Holder for the subject token format.

### [LocalServerCodeReceiver](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.LocalServerCodeReceiver.md.txt)

OAuth 2.0 verification code receiver that runs a local server on a free port and waits for a call with the
authorization verification code.

### [OidcToken](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.OidcToken.md.txt)

Represents an OIDC Token.

### [OidcTokenOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.OidcTokenOptions.md.txt)

Options used to create an [OidcToken](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.OidcToken.md.txt).

### [ProgrammaticExternalAccountCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ProgrammaticExternalAccountCredential.md.txt)

External account credentials that rely on user-provided code to obtain the third-party token.

### [ProgrammaticExternalAccountCredential.Initializer](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ProgrammaticExternalAccountCredential.Initializer.md.txt)

Initializer for [ProgrammaticExternalAccountCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ProgrammaticExternalAccountCredential.md.txt).

### [RequestExtensions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.RequestExtensions.md.txt)

Extension methods for requests.

### [ServiceAccountCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ServiceAccountCredential.md.txt)

Google OAuth 2.0 credential for accessing protected resources using an access token. The Google OAuth 2.0
Authorization Server supports server-to-server interactions such as those between a web application and Google
Cloud Storage. The requesting application has to prove its own identity to gain access to an API, and an
end-user doesn't have to be involved.


Take a look in <https://developers.google.com/accounts/docs/OAuth2ServiceAccount> for more details.


Since version 1.9.3, service account credential also supports JSON Web Token access token scenario.
In this scenario, instead of sending a signed JWT claim to a token server and exchanging it for
an access token, a locally signed JWT claim bound to an appropriate URI is used as an access token
directly.
See [GetAccessTokenForRequestAsync(string, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ServiceAccountCredential.md.txt#Google_Apis_Auth_OAuth2_ServiceAccountCredential_GetAccessTokenForRequestAsync_System_String_System_Threading_CancellationToken_) for explanation when JWT access token
is used and when regular OAuth2 token is used.

<br />

### [ServiceAccountCredential.Initializer](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ServiceAccountCredential.Initializer.md.txt)

An initializer class for the service account credential.

### [ServiceCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ServiceCredential.md.txt)

This type of Google OAuth 2.0 credential enables access to protected resources using an access token when
interacting server to server. For example, a service account credential could be used to access Google Cloud
Storage from a web application without a user's involvement.


[ServiceAccountCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ServiceAccountCredential.md.txt) inherits from this class in order to support Service Accounts. More
details available at: <https://developers.google.com/accounts/docs/OAuth2ServiceAccount>.
[ComputeCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ComputeCredential.md.txt) is another example of a class that inherits from this
class in order to support Compute credentials. For more information about Compute authentication, see:
<https://cloud.google.com/compute/docs/authentication>.


[ExternalAccountCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ExternalAccountCredential.md.txt) inherits from this class to support both Workload Identity Federation
and Workforce Identity Federation. You can read more about these topics in
<https://cloud.google.com/iam/docs/workload-identity-federation> and
<https://cloud.google.com/iam/docs/workforce-identity-federation> respectively.
Note that in the case of Workforce Identity Federation, the external account does not represent a service account
but a user account, so, the fact that [ExternalAccountCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ExternalAccountCredential.md.txt) inherits from [ServiceCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ServiceCredential.md.txt)
might be construed as misleading. In reality [ServiceCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ServiceCredential.md.txt) is not tied to a service account
in terms of implementation, only in terms of name. For instance, a better name for this class might have been NoUserFlowCredential, and
in that sense, it's correct that [ExternalAccountCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ExternalAccountCredential.md.txt) inherits from [ServiceCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ServiceCredential.md.txt)
even when representing a Workforce Identity Federation account.

<br />

### [ServiceCredential.Initializer](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ServiceCredential.Initializer.md.txt)

An initializer class for the service credential.

### [SubjectTokenException](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.SubjectTokenException.md.txt)

Exception thrown when the subject token cannot be obtained for a given
external account credential.

### [UrlSourcedExternalAccountCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.UrlSourcedExternalAccountCredential.md.txt)

URL-sourced credentials as described in
<https://google.aip.dev/auth/4117#determining-the-subject-token-in-microsoft-azure-and-url-sourced-credentials>.

### [UserCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.UserCredential.md.txt)

OAuth 2.0 credential for accessing protected resources using an access token, as well as optionally refreshing
the access token when it expires using a refresh token.

## Interfaces

### [IAccessMethod](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.IAccessMethod.md.txt)

Method of presenting the access token to the resource server as specified in
<http://tools.ietf.org/html/rfc6749#section-7>

### [IAuthorizationCodeInstalledApp](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.IAuthorizationCodeInstalledApp.md.txt)

Authorization code flow for an installed application that persists end-user credentials.

### [IBlobSigner](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.IBlobSigner.md.txt)

Represents a data blob signer.

### [ICodeReceiver](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ICodeReceiver.md.txt)

OAuth 2.0 verification code receiver.

### [ICredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ICredential.md.txt)

The main interface to represent credential in the client library.
Service account, User account and Compute credential inherit from this interface
to provide access token functionality. In addition this interface inherits from
[IConfigurableHttpClientInitializer](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.IConfigurableHttpClientInitializer.md.txt) to be able to hook to http requests.
More details are available in the specific implementations.

### [IOidcTokenProvider](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.IOidcTokenProvider.md.txt)

Represents an OIDC token provider.

### [ITokenAccess](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ITokenAccess.md.txt)

Allows direct retrieval of access tokens to authenticate requests.
This is necessary for workflows where you don't want to use
[BaseClientService](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Services.BaseClientService.md.txt) to access the API.
(e.g. gRPC that implemenents the entire HTTP2 stack internally).

### [ITokenAccessWithHeaders](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ITokenAccessWithHeaders.md.txt)

Allows direct retrieval of access tokens to authenticate requests.
The access tokens obtained can be accompanied by extra information
that either describes the access token or is associated with it.
This information should acompany the token as headers when the token
is used to access a resource.

### [ProgrammaticExternalAccountCredential.ISubjectTokenProvider](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ProgrammaticExternalAccountCredential.ISubjectTokenProvider.md.txt)

Subject token provider which is passed to a [ProgrammaticExternalAccountCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.ProgrammaticExternalAccountCredential.md.txt) as the means
to obtain the third-party or external credentials token to include on the STS token exchange request.

## Enums

### [LocalServerCodeReceiver.CallbackUriChooserStrategy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.LocalServerCodeReceiver.CallbackUriChooserStrategy.md.txt)

Describes the different strategies for the selection of the callback URI.
127.0.0.1 is recommended, but can't be done in non-admin Windows 7 and 8 at least.

### [OidcTokenFormat](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.OidcTokenFormat.md.txt)

Represents the OIDC token formats supported when the token is obtained using the GCE metadata server.