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