Class ServiceCredential.Initializer
An initializer class for the service credential.
Inheritance
Inherited Members
Namespace: Google.Apis.Auth.OAuth2
Assembly: Google.Apis.Auth.dll
Syntax
public class Initializer
Constructors
Initializer(String)
Constructs a new initializer using the given token server URL.
Declaration
public Initializer(string tokenServerUrl)
Parameters
Type | Name | Description |
---|---|---|
System.String | tokenServerUrl |
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 |
Clock
Gets or sets the clock used to refresh the token when it expires. The default value is Default.
Declaration
public IClock Clock { get; set; }
Property Value
Type | Description |
---|---|
Google.Apis.Util.IClock |
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 the user to
configure the ConfigurableMessageHandler in an
Google.Apis.Http.IConfigurableHttpClientInitializer to set a specific back-off
implementation (using BackOffHandler).
Declaration
public ExponentialBackOffPolicy DefaultExponentialBackOffPolicy { get; set; }
Property Value
Type | Description |
---|---|
Google.Apis.Http.ExponentialBackOffPolicy |
HttpClientFactory
Gets or sets the factory for creating a System.Net.Http.HttpClient instance.
Declaration
public IHttpClientFactory HttpClientFactory { get; set; }
Property Value
Type | Description |
---|---|
Google.Apis.Http.IHttpClientFactory |
TokenServerUrl
Gets the token server URL.
Declaration
public string TokenServerUrl { get; }
Property Value
Type | Description |
---|---|
System.String |