public class ServiceAccountCredential.Initializer : ServiceCredential.InitializerAn initializer class for the service account credential.
Namespace
Google.Apis.Auth.OAuth2Assembly
Google.Apis.Auth.dll
Constructors
Initializer(string)
public Initializer(string id)Constructs a new initializer using the given id.
| Parameter | |
|---|---|
| Name | Description | 
| id | string | 
Initializer(string, string)
public Initializer(string id, string tokenServerUrl)Constructs a new initializer using the given id and the token server URL.
| Parameters | |
|---|---|
| Name | Description | 
| id | string | 
| tokenServerUrl | string | 
Properties
Id
public string Id { get; }Gets the service account ID (typically an e-mail address).
| Property Value | |
|---|---|
| Type | Description | 
| string | |
Key
public RSA Key { get; set; }Gets or sets the key which is used to sign the request, as specified in https://developers.google.com/accounts/docs/OAuth2ServiceAccount#computingsignature.
| Property Value | |
|---|---|
| Type | Description | 
| RSA | |
KeyId
public string KeyId { get; set; }Gets or sets the service account key ID.
| Property Value | |
|---|---|
| Type | Description | 
| string | |
ProjectId
public string ProjectId { get; set; }The project ID associated with this credential.
| Property Value | |
|---|---|
| Type | Description | 
| string | |
UniverseDomain
public string UniverseDomain { get; set; }The universe domain this credential belongs to. Won't be null.
| Property Value | |
|---|---|
| Type | Description | 
| string | |
UseJwtAccessWithScopes
public bool UseJwtAccessWithScopes { get; set; }Gets or sets the flag preferring use of self-signed JWTs over OAuth tokens when OAuth scopes are explicitly set.
| Property Value | |
|---|---|
| Type | Description | 
| bool | |
User
public string User { get; set; }Gets or sets the email address of the user the application is trying to impersonate in the service 
account flow or null.
| Property Value | |
|---|---|
| Type | Description | 
| string | |
Methods
FromCertificate(X509Certificate2)
public ServiceAccountCredential.Initializer FromCertificate(X509Certificate2 certificate)Extracts a Key from the given certificate.
| Parameter | |
|---|---|
| Name | Description | 
| certificate | X509Certificate2 | 
| Returns | |
|---|---|
| Type | Description | 
| ServiceAccountCredentialInitializer | |
FromPrivateKey(string)
public ServiceAccountCredential.Initializer FromPrivateKey(string privateKey)Extracts the Key from the given PKCS8 private key.
| Parameter | |
|---|---|
| Name | Description | 
| privateKey | string | 
| Returns | |
|---|---|
| Type | Description | 
| ServiceAccountCredentialInitializer | |