1.73.0 (latest) 1.69.0 1.68.0 1.60.0 1.59.0 1.55.0 1.50.0

    public sealed class GoogleClientSecrets

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

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> GoogleClientSecrets

## Inherited Members

[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.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](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.md.txt)

## Assembly

Google.Apis.Auth.dll

## Properties

### Secrets

    public ClientSecrets Secrets { get; }

Gets the client secrets which contains the client identifier and client secret.

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

## Methods

### FromFile(string)

    public static GoogleClientSecrets FromFile(string clientSecretsFilePath)

Loads the Google client secret from a JSON file.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `clientSecretsFilePath` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `GoogleClientSecrets` |   |

### FromFileAsync(string, CancellationToken)

    public static Task<GoogleClientSecrets> FromFileAsync(string clientSecretsFilePath, CancellationToken cancellationToken = default)

Asynchronously loads the Google client secret from a JSON file.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `clientSecretsFilePath` | `string` |
| `cancellationToken` | `CancellationToken` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskGoogleClientSecrets` |   |

### FromStream(Stream)

    public static GoogleClientSecrets FromStream(Stream stream)

Loads the Google client secret from the input stream.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stream` | `Stream` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `GoogleClientSecrets` |   |

### FromStreamAsync(Stream, CancellationToken)

    public static Task<GoogleClientSecrets> FromStreamAsync(Stream stream, CancellationToken cancellationToken = default)

Asynchronously loads the Google client secret from the input stream.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `stream` | `Stream` |
| `cancellationToken` | `CancellationToken` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskGoogleClientSecrets` |   |

### Load(Stream)

    [Obsolete("Please use GoogleClientSecrets.FromStream which is an equivalent alternative.")]
    public static GoogleClientSecrets Load(Stream stream)

Loads the Google client secret from the input stream.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stream` | `Stream` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `GoogleClientSecrets` |   |

**Remarks** This method has been made obsolete in favour of [FromStream(Stream)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.GoogleClientSecrets.md.txt#Google_Apis_Auth_OAuth2_GoogleClientSecrets_FromStream_System_IO_Stream_)
which only differs in name.

## 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_)