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
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 Google.Apis.Http.ConfigurableMessageHandler in an
Google.Apis.Http.IConfigurableHttpClientInitializer to set a specific back-off
implementation (using Google.Apis.Http.BackOffHandler).
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 |