1.73.0 (latest) 1.69.0 1.68.0 1.60.0 1.59.0 1.55.0 1.50.0

    public class GoogleAuthorizationCodeFlow.Initializer : AuthorizationCodeFlow.Initializer

An initializer class for Google authorization code flow.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [AuthorizationCodeFlow](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Flows.AuthorizationCodeFlow.md.txt)[Initializer](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Flows.AuthorizationCodeFlow.Initializer.md.txt) \> GoogleAuthorizationCodeFlow.Initializer

## Inherited Members

[AuthorizationCodeFlow.Initializer.AccessMethod](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Flows.AuthorizationCodeFlow.Initializer.md.txt#Google_Apis_Auth_OAuth2_Flows_AuthorizationCodeFlow_Initializer_AccessMethod) [AuthorizationCodeFlow.Initializer.TokenServerUrl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Flows.AuthorizationCodeFlow.Initializer.md.txt#Google_Apis_Auth_OAuth2_Flows_AuthorizationCodeFlow_Initializer_TokenServerUrl) [AuthorizationCodeFlow.Initializer.AuthorizationServerUrl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Flows.AuthorizationCodeFlow.Initializer.md.txt#Google_Apis_Auth_OAuth2_Flows_AuthorizationCodeFlow_Initializer_AuthorizationServerUrl) [AuthorizationCodeFlow.Initializer.ClientSecrets](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Flows.AuthorizationCodeFlow.Initializer.md.txt#Google_Apis_Auth_OAuth2_Flows_AuthorizationCodeFlow_Initializer_ClientSecrets) [AuthorizationCodeFlow.Initializer.ClientSecretsStream](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Flows.AuthorizationCodeFlow.Initializer.md.txt#Google_Apis_Auth_OAuth2_Flows_AuthorizationCodeFlow_Initializer_ClientSecretsStream) [AuthorizationCodeFlow.Initializer.DataStore](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Flows.AuthorizationCodeFlow.Initializer.md.txt#Google_Apis_Auth_OAuth2_Flows_AuthorizationCodeFlow_Initializer_DataStore) [AuthorizationCodeFlow.Initializer.Scopes](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Flows.AuthorizationCodeFlow.Initializer.md.txt#Google_Apis_Auth_OAuth2_Flows_AuthorizationCodeFlow_Initializer_Scopes) [AuthorizationCodeFlow.Initializer.HttpClientFactory](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Flows.AuthorizationCodeFlow.Initializer.md.txt#Google_Apis_Auth_OAuth2_Flows_AuthorizationCodeFlow_Initializer_HttpClientFactory) [AuthorizationCodeFlow.Initializer.DefaultExponentialBackOffPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Flows.AuthorizationCodeFlow.Initializer.md.txt#Google_Apis_Auth_OAuth2_Flows_AuthorizationCodeFlow_Initializer_DefaultExponentialBackOffPolicy) [AuthorizationCodeFlow.Initializer.Clock](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Flows.AuthorizationCodeFlow.Initializer.md.txt#Google_Apis_Auth_OAuth2_Flows_AuthorizationCodeFlow_Initializer_Clock) [object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

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

## Assembly

Google.Apis.Auth.dll

## Constructors

### Initializer()

    public Initializer()

Constructs a new initializer. Sets Authorization server URL to
[OidcAuthorizationUrl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.GoogleAuthConsts.md.txt#Google_Apis_Auth_OAuth2_GoogleAuthConsts_OidcAuthorizationUrl), and Token server URL to
[OidcTokenUrl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.GoogleAuthConsts.md.txt#Google_Apis_Auth_OAuth2_GoogleAuthConsts_OidcTokenUrl).

### Initializer(string, string, string)

    protected Initializer(string authorizationServerUrl, string tokenServerUrl, string revokeTokenUrl)

Constructs a new initializer.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `authorizationServerUrl` | `string` Authorization server URL |
| `tokenServerUrl` | `string` Token server URL |
| `revokeTokenUrl` | `string` Revocation server URL |

**Remarks** This is mainly for internal testing at Google, where we occasionally need
to use alternative oauth endpoints. This is not for general use.

## Properties

### IncludeGrantedScopes

    public bool? IncludeGrantedScopes { get; set; }

Gets or sets the optional indicator for including granted scopes for incremental authorization.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### LoginHint

    public string LoginHint { get; set; }

Gets or sets the login_hint.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### Nonce

    public string Nonce { get; set; }

Gets or sets the nonce.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### ProjectId

    public string ProjectId { get; set; }

The project ID associated with the credential using this flow.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### Prompt

    public string Prompt { get; set; }

Gets or sets the prompt for consent behaviour.
Value can be `null`, `"none"`, `"consent"`, or `"select_account"`.
See [OpenIDConnect documentation](https://developers.google.com/identity/protocols/OpenIDConnect#prompt)
for details.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### RevokeTokenUrl

    public string RevokeTokenUrl { get; set; }

Gets or sets the token revocation URL.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### UserDefinedQueryParams

    public IEnumerable<KeyValuePair<string, string>> UserDefinedQueryParams { get; set; }

Gets or sets the optional user defined query parameters.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| ``IEnumerableSystem.Collections.Generic.KeyValuePair`2stringstring`` |   |

## Extension Method

[Utilities.ThrowIfNull\<T\>(T, string)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Util.Utilities.md.txt#Google_Apis_Util_Utilities_ThrowIfNull__1___0_System_String_)