Class ServiceCredential.Initializer (1.55.0)

public class Initializer

An initializer class for the service credential.

Inheritance

Object > ServiceCredential.Initializer

Namespace

Google.Apis.Auth.OAuth2

Assembly

Google.Apis.Auth.dll

Constructors

Initializer(String)

public Initializer(string tokenServerUrl)

Constructs a new initializer using the given token server URL.

Parameter
NameDescription
tokenServerUrlString

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

Clock

public IClock Clock { get; set; }

Gets or sets the clock used to refresh the token when it expires. The default value is Default.

Property Value
TypeDescription
IClock

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 the 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 a HttpClient instance.

Property Value
TypeDescription
IHttpClientFactory

QuotaProject

public string QuotaProject { get; set; }

The ID of the project associated to this credential for the purposes of quota calculation and billing. May be null.

Property Value
TypeDescription
String

TokenServerUrl

public string TokenServerUrl { get; }

Gets the token server URL.

Property Value
TypeDescription
String

Extension Method