public class Initializer : object
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.
Parameters | |
---|---|
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.
Property Value | |
---|---|
Type | Description |
IAccessMethod |
AuthorizationServerUrl
public string AuthorizationServerUrl { get; }
Gets or sets the authorization server URL.
Property Value | |
---|---|
Type | Description |
String |
ClientSecrets
public ClientSecrets ClientSecrets { get; set; }
Gets or sets the client secrets which includes the client identifier and its secret.
Property Value | |
---|---|
Type | Description |
ClientSecrets |
ClientSecretsStream
public Stream ClientSecretsStream { get; set; }
Gets or sets the client secrets stream which contains the client identifier and its secret.
Property Value | |
---|---|
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.
Property Value | |
---|---|
Type | Description |
IClock |
DataStore
public IDataStore DataStore { get; set; }
Gets or sets the data store used to store the token response.
Property Value | |
---|---|
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).
Property Value | |
---|---|
Type | Description |
ExponentialBackOffPolicy |
HttpClientFactory
public IHttpClientFactory HttpClientFactory { get; set; }
Gets or sets the factory for creating instance.
Property Value | |
---|---|
Type | Description |
IHttpClientFactory |
Scopes
public IEnumerable<string> Scopes { get; set; }
Gets or sets the scopes which indicate the API access your application is requesting.
Property Value | |
---|---|
Type | Description |
IEnumerable<String> |
TokenServerUrl
public string TokenServerUrl { get; }
Gets the token server URL.
Property Value | |
---|---|
Type | Description |
String |