public class ServiceCredential.Initializer
An initializer class for the service credential.
Derived Types
Namespace
Google.Apis.Auth.OAuth2Assembly
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; }
Indicates which of exceptions and / or HTTP status codes are automatically retried using exponential backoff. The default value is RecommendedOrDefault which means retries will be executed as recommended by each service. For services that have no specific recommendations UnsuccessfulResponse503 will be used, which means HTTP Status code 503 will be retried with exponential backoff. If set to None no automatic retries will happen. Calling code may still specify custom retries by configuring HttpClient.
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 |