Class GoogleClientSecrets
OAuth 2.0 client secrets model as specified in https://cloud.google.com/console/.
Inheritance
System.Object
GoogleClientSecrets
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.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 |
|---|---|---|
| System.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(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | clientSecretsFilePath | |
| System.Threading.CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<GoogleClientSecrets> |
FromStream(Stream)
Loads the Google client secret from the input stream.
Declaration
public static GoogleClientSecrets FromStream(Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.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(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | stream | |
| System.Threading.CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.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 |
|---|---|---|
| System.IO.Stream | stream |
Returns
| Type | Description |
|---|---|
| GoogleClientSecrets |
Remarks
This method has been made obsolete in favour of FromStream(Stream) which only differs in name.