Class AuthorizationCodeFlow.Initializer (1.55.0)

public class Initializer

An initializer class for the authorization code flow.

Inheritance

Object > AuthorizationCodeFlow.Initializer

Namespace

Google.Apis.Auth.OAuth2.Flows

Assembly

Google.Apis.Auth.dll

Constructors

Initializer(String, String)

public Initializer(string authorizationServerUrl, string tokenServerUrl)

Constructs a new initializer.

Parameters
NameDescription
authorizationServerUrlString

Authorization server URL

tokenServerUrlString

Token server URL

Properties

AccessMethod

public IAccessMethod AccessMethod { get; set; }

Gets or sets the method for presenting the access token to the resource server. The default value is BearerToken.AuthorizationHeaderAccessMethod.

Property Value
TypeDescription
IAccessMethod

AuthorizationServerUrl

public string AuthorizationServerUrl { get; }

Gets or sets the authorization server URL.

Property Value
TypeDescription
String

ClientSecrets

public ClientSecrets ClientSecrets { get; set; }

Gets or sets the client secrets which includes the client identifier and its secret.

Property Value
TypeDescription
ClientSecrets

ClientSecretsStream

public Stream ClientSecretsStream { get; set; }

Gets or sets the client secrets stream which contains the client identifier and its secret.

Property Value
TypeDescription
Stream
Remarks

The AuthorizationCodeFlow constructor is responsible for disposing the stream.

Clock

public IClock Clock { get; set; }

Gets or sets the clock. The clock is used to determine if the token has expired, if so we will try to refresh it. The default value is Default.

Property Value
TypeDescription
IClock

DataStore

public IDataStore DataStore { get; set; }

Gets or sets the data store used to store the token response.

Property Value
TypeDescription
IDataStore

DefaultExponentialBackOffPolicy

public ExponentialBackOffPolicy DefaultExponentialBackOffPolicy { get; set; }

Get or sets the exponential back-off policy. Default value is UnsuccessfulResponse503, which means that exponential back-off is used on 503 abnormal HTTP responses. If the value is set to None, no exponential back-off policy is used, and it's up to user to configure the ConfigurableMessageHandler in an IConfigurableHttpClientInitializer to set a specific back-off implementation (using BackOffHandler).

Property Value
TypeDescription
ExponentialBackOffPolicy

HttpClientFactory

public IHttpClientFactory HttpClientFactory { get; set; }

Gets or sets the factory for creating HttpClient instance.

Property Value
TypeDescription
IHttpClientFactory

Scopes

public IEnumerable<string> Scopes { get; set; }

Gets or sets the scopes which indicate the API access your application is requesting.

Property Value
TypeDescription
IEnumerable<String>

TokenServerUrl

public string TokenServerUrl { get; }

Gets the token server URL.

Property Value
TypeDescription
String

Extension Method