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 ServiceCredential.Initializer
Constructors
Initializer(string)
Constructs a new initializer using the given token server URL.
Declaration
public Initializer(string tokenServerUrl)
Parameters
Type | Name | Description |
---|---|---|
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 Google.Apis.Util.SystemClock.Default.
Declaration
public IClock Clock { get; set; }
Property Value
Type | Description |
---|---|
IClock |
DefaultExponentialBackOffPolicy
Indicates which of exceptions and / or HTTP status codes are automatically retried using exponential backoff. The default value is Google.Apis.Http.ExponentialBackOffPolicy.RecommendedOrDefault which means retries will be executed as recommended by each service. For services that have no specific recommendations Google.Apis.Http.ExponentialBackOffPolicy.UnsuccessfulResponse503 will be used, which means HTTP Status code 503 will be retried with exponential backoff. If set to Google.Apis.Http.ExponentialBackOffPolicy.None no automatic retries will happen. Calling code may still specify custom retries by configuring HttpClient.
Declaration
public ExponentialBackOffPolicy DefaultExponentialBackOffPolicy { get; set; }
Property Value
Type | Description |
---|---|
ExponentialBackOffPolicy |
HttpClientFactory
Gets or sets the factory for creating a HttpClient instance.
Declaration
public IHttpClientFactory HttpClientFactory { get; set; }
Property Value
Type | Description |
---|---|
IHttpClientFactory |
QuotaProject
The ID of the project associated to this credential for the purposes of quota calculation and billing. May be null.
Declaration
public string QuotaProject { get; set; }
Property Value
Type | Description |
---|---|
string |
Scopes
Scopes to request during the authorization grant. May be null or empty.
Declaration
public IEnumerable<string> Scopes { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<string> |
Remarks
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
Gets the token server URL.
Declaration
public string TokenServerUrl { get; }
Property Value
Type | Description |
---|---|
string |