Class GoogleClientSecrets (1.59.0)

public sealed class GoogleClientSecrets

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

Inheritance

Object > GoogleClientSecrets

Namespace

Google.Apis.Auth.OAuth2

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
TypeDescription
ClientSecrets

Methods

FromFile(String)

public static GoogleClientSecrets FromFile(string clientSecretsFilePath)

Loads the Google client secret from a JSON file.

Parameter
NameDescription
clientSecretsFilePathString
Returns
TypeDescription
GoogleClientSecrets

FromFileAsync(String, CancellationToken)

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

Asynchronously loads the Google client secret from a JSON file.

Parameters
NameDescription
clientSecretsFilePathString
cancellationTokenCancellationToken
Returns
TypeDescription
Task<GoogleClientSecrets>

FromStream(Stream)

public static GoogleClientSecrets FromStream(Stream stream)

Loads the Google client secret from the input stream.

Parameter
NameDescription
streamStream
Returns
TypeDescription
GoogleClientSecrets

FromStreamAsync(Stream, CancellationToken)

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

Asynchronously loads the Google client secret from the input stream.

Parameters
NameDescription
streamStream
cancellationTokenCancellationToken
Returns
TypeDescription
Task<GoogleClientSecrets>

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
NameDescription
streamStream
Returns
TypeDescription
GoogleClientSecrets
Remarks

This method has been made obsolete in favour of FromStream(Stream) which only differs in name.

Extension Method