Class AuthorizationCodeFlow.Initializer
An initializer class for the authorization code flow.
Inherited Members
Namespace: Google.Apis.Auth.OAuth2.Flows
Assembly: Google.Apis.Auth.dll
Syntax
public class AuthorizationCodeFlow.Initializer
Constructors
Initializer(string, string)
Constructs a new initializer.
Declaration
public Initializer(string authorizationServerUrl, string tokenServerUrl)
Parameters
| Type | Name | Description |
|---|---|---|
| string | authorizationServerUrl | Authorization server URL |
| string | tokenServerUrl | Token server URL |
Properties
AccessMethod
Gets or sets the method for presenting the access token to the resource server. The default value is BearerToken.AuthorizationHeaderAccessMethod.
Declaration
public IAccessMethod AccessMethod { get; set; }
Property Value
| Type | Description |
|---|---|
| IAccessMethod |
AuthorizationServerUrl
Gets or sets the authorization server URL.
Declaration
public string AuthorizationServerUrl { get; }
Property Value
| Type | Description |
|---|---|
| string |
ClientSecrets
Gets or sets the client secrets which includes the client identifier and its secret.
Declaration
public ClientSecrets ClientSecrets { get; set; }
Property Value
| Type | Description |
|---|---|
| ClientSecrets |
ClientSecretsStream
Gets or sets the client secrets stream which contains the client identifier and its secret.
Declaration
public Stream ClientSecretsStream { get; set; }
Property Value
| Type | Description |
|---|---|
| Stream |
Remarks
The AuthorizationCodeFlow constructor is responsible for disposing the stream.
Clock
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 Google.Apis.Util.SystemClock.Default.
Declaration
public IClock Clock { get; set; }
Property Value
| Type | Description |
|---|---|
| IClock |
DataStore
Gets or sets the data store used to store the token response.
Declaration
public IDataStore DataStore { get; set; }
Property Value
| Type | Description |
|---|---|
| IDataStore |
DefaultExponentialBackOffPolicy
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 Google.Apis.Http.ConfigurableMessageHandler in an
Google.Apis.Http.IConfigurableHttpClientInitializer to set a specific back-off
implementation (using Google.Apis.Http.BackOffHandler).
Declaration
public ExponentialBackOffPolicy DefaultExponentialBackOffPolicy { get; set; }
Property Value
| Type | Description |
|---|---|
| ExponentialBackOffPolicy |
HttpClientFactory
Gets or sets the factory for creating HttpClient instance.
Declaration
public IHttpClientFactory HttpClientFactory { get; set; }
Property Value
| Type | Description |
|---|---|
| IHttpClientFactory |
Scopes
Gets or sets the scopes which indicate the API access your application is requesting.
Declaration
public IEnumerable<string> Scopes { get; set; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<string> |
TokenServerUrl
Gets the token server URL.
Declaration
public string TokenServerUrl { get; }
Property Value
| Type | Description |
|---|---|
| string |