Show / Hide Table of Contents

Class GoogleClientSecrets

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

Inheritance
object
GoogleClientSecrets
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.Auth.OAuth2
Assembly: Google.Apis.Auth.dll
Syntax
public sealed class GoogleClientSecrets

Properties

Secrets

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

Declaration
public ClientSecrets Secrets { get; }
Property Value
Type Description
ClientSecrets

Methods

FromFile(string)

Loads the Google client secret from a JSON file.

Declaration
public static GoogleClientSecrets FromFile(string clientSecretsFilePath)
Parameters
Type Name Description
string clientSecretsFilePath
Returns
Type Description
GoogleClientSecrets

FromFileAsync(string, CancellationToken)

Asynchronously loads the Google client secret from a JSON file.

Declaration
public static Task<GoogleClientSecrets> FromFileAsync(string clientSecretsFilePath, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string clientSecretsFilePath
CancellationToken cancellationToken
Returns
Type Description
Task<GoogleClientSecrets>

FromStream(Stream)

Loads the Google client secret from the input stream.

Declaration
public static GoogleClientSecrets FromStream(Stream stream)
Parameters
Type Name Description
Stream stream
Returns
Type Description
GoogleClientSecrets

FromStreamAsync(Stream, CancellationToken)

Asynchronously loads the Google client secret from the input stream.

Declaration
public static Task<GoogleClientSecrets> FromStreamAsync(Stream stream, CancellationToken cancellationToken = default)
Parameters
Type Name Description
Stream stream
CancellationToken cancellationToken
Returns
Type Description
Task<GoogleClientSecrets>

Load(Stream)

Loads the Google client secret from the input stream.

Declaration
[Obsolete("Please use GoogleClientSecrets.FromStream which is an equivalent alternative.")]
public static GoogleClientSecrets Load(Stream stream)
Parameters
Type Name Description
Stream stream
Returns
Type Description
GoogleClientSecrets
Remarks

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

In this article
Back to top Generated by DocFX