public class ServiceCredential.Initializer
An initializer class for the service credential.
Derived Types
Namespace
GoogleApisAuthOAuth2Assembly
Google.Apis.Auth.dll
Constructors
Initializer(string)
public Initializer(string tokenServerUrl)
Constructs a new initializer using the given token server URL.
Parameter | |
---|---|
Name | Description |
tokenServerUrl |
string |
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 |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
ExponentialBackOffPolicy |
HttpClientFactory
public IHttpClientFactory HttpClientFactory { get; set; }
Gets or sets the factory for creating a HttpClient instance.
Property Value | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
string |
Scopes
public IEnumerable<string> Scopes { get; set; }
Scopes to request during the authorization grant. May be null or empty.
Property Value | |
---|---|
Type | Description |
IEnumerablestring |
If the scopes are pre-granted through the environement, like in GCE where scopes are granted to the VM, scopes set here will be ignored.
TokenServerUrl
public string TokenServerUrl { get; }
Gets the token server URL.
Property Value | |
---|---|
Type | Description |
string |