public class Initializer
An initializer class for the authorization code flow.
Derived Types
Namespace
Google.Apis.Auth.OAuth2.FlowsAssembly
Google.Apis.Auth.dll
Constructors
Initializer(String, String)
public Initializer(string authorizationServerUrl, string tokenServerUrl)
Constructs a new initializer.
Name | Description |
authorizationServerUrl | String Authorization server URL |
tokenServerUrl | String 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.
Type | Description |
IAccessMethod |
AuthorizationServerUrl
public string AuthorizationServerUrl { get; }
Gets or sets the authorization server URL.
Type | Description |
String |
ClientSecrets
public ClientSecrets ClientSecrets { get; set; }
Gets or sets the client secrets which includes the client identifier and its secret.
Type | Description |
ClientSecrets |
ClientSecretsStream
public Stream ClientSecretsStream { get; set; }
Gets or sets the client secrets stream which contains the client identifier and its secret.
Type | Description |
Stream |
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.
Type | Description |
IClock |
DataStore
public IDataStore DataStore { get; set; }
Gets or sets the data store used to store the token response.
Type | Description |
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).
Type | Description |
ExponentialBackOffPolicy |
HttpClientFactory
public IHttpClientFactory HttpClientFactory { get; set; }
Gets or sets the factory for creating HttpClient instance.
Type | Description |
IHttpClientFactory |
Scopes
public IEnumerable<string> Scopes { get; set; }
Gets or sets the scopes which indicate the API access your application is requesting.
Type | Description |
IEnumerable<String> |
TokenServerUrl
public string TokenServerUrl { get; }
Gets the token server URL.
Type | Description |
String |