Class ServiceAccountCredential.Initializer
An initializer class for the service account credential.
Inheritance
System.Object
ServiceAccountCredential.Initializer
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Google.Apis.Auth.dll
Syntax
public class Initializer : ServiceCredential.Initializer
Constructors
Initializer(String)
Constructs a new initializer using the given id.
Declaration
public Initializer(string id)
Parameters
| Type |
Name |
Description |
| System.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
| Type |
Name |
Description |
| System.String |
id |
|
| System.String |
tokenServerUrl |
|
Properties
Id
Gets the service account ID (typically an e-mail address).
Declaration
public string Id { get; }
Property Value
| Type |
Description |
| System.String |
|
Key
Declaration
public RSA Key { get; set; }
Property Value
| Type |
Description |
| System.Security.Cryptography.RSA |
|
KeyId
Gets or sets the service account key ID.
Declaration
public string KeyId { get; set; }
Property Value
| Type |
Description |
| System.String |
|
ProjectId
The project ID associated with this credential.
Declaration
public string ProjectId { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Scopes
Gets the scopes which indicate API access your application is requesting.
Declaration
public IEnumerable<string> Scopes { get; set; }
Property Value
| Type |
Description |
| System.Collections.Generic.IEnumerable<System.String> |
|
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
| Type |
Description |
| System.Boolean |
|
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
| Type |
Description |
| System.String |
|
Methods
FromCertificate(X509Certificate2)
Extracts a Key from the given certificate.
Declaration
public ServiceAccountCredential.Initializer FromCertificate(X509Certificate2 certificate)
Parameters
| Type |
Name |
Description |
| System.Security.Cryptography.X509Certificates.X509Certificate2 |
certificate |
|
Returns
FromPrivateKey(String)
Extracts the Key from the given PKCS8 private key.
Declaration
public ServiceAccountCredential.Initializer FromPrivateKey(string privateKey)
Parameters
| Type |
Name |
Description |
| System.String |
privateKey |
|
Returns