Class JsonCredentialParameters
Holder for credential parameters read from JSON credential file. Fields are union of parameters for all supported credential types.
Inherited Members
Namespace: Google.Apis.Auth.OAuth2
Assembly: Google.Apis.Auth.dll
Syntax
public class JsonCredentialParameters
Fields
AuthorizedUserCredentialType
UserCredential is created by the GCloud SDK tool when the user runs GCloud Auth Login.
Declaration
public const string AuthorizedUserCredentialType = "authorized_user"
Field Value
Type | Description |
---|---|
string |
ExternalAccountCredentialType
See https://cloud.google.com/iam/docs/workload-identity-federation on how to create external account credentials.
Declaration
public const string ExternalAccountCredentialType = "external_account"
Field Value
Type | Description |
---|---|
string |
ImpersonatedServiceAccountCredentialType
ImpersonatedCredential is created by the GCloud SDK tool when the user runs GCloud Auth ADC Login using the --impersonate-service-account flag.
Declaration
public const string ImpersonatedServiceAccountCredentialType = "impersonated_service_account"
Field Value
Type | Description |
---|---|
string |
ServiceAccountCredentialType
ServiceAccountCredential is downloaded by the user from Google Developers Console.
Declaration
public const string ServiceAccountCredentialType = "service_account"
Field Value
Type | Description |
---|---|
string |
Properties
Audience
The STS audience associated with an external account credential.
Declaration
[JsonProperty("audience")]
public string Audience { get; set; }
Property Value
Type | Description |
---|---|
string |
ClientEmail
Client Email associated with ServiceAccountCredential obtained from Google Developers Console
Declaration
[JsonProperty("client_email")]
public string ClientEmail { get; set; }
Property Value
Type | Description |
---|---|
string |
ClientId
Client Id associated with UserCredential created by GCloud Auth Login or with an external account credential.
Declaration
[JsonProperty("client_id")]
public string ClientId { get; set; }
Property Value
Type | Description |
---|---|
string |
ClientSecret
Client Secret associated with UserCredential created by GCloud Auth Login or with an external account credential.
Declaration
[JsonProperty("client_secret")]
public string ClientSecret { get; set; }
Property Value
Type | Description |
---|---|
string |
CredentialSourceConfig
The credential source associated with an external account credential.
Declaration
[JsonProperty("credential_source")]
public JsonCredentialParameters.CredentialSource CredentialSourceConfig { get; set; }
Property Value
Type | Description |
---|---|
JsonCredentialParameters.CredentialSource |
Delegates
Delegates chain associated to the impersonated credential.
Declaration
[JsonProperty("delegates")]
public string[] Delegates { get; set; }
Property Value
Type | Description |
---|---|
string[] |
PrivateKey
Private Key associated with ServiceAccountCredential obtained from Google Developers Console.
Declaration
[JsonProperty("private_key")]
public string PrivateKey { get; set; }
Property Value
Type | Description |
---|---|
string |
PrivateKeyId
Private Key ID associated with ServiceAccountCredential obtained from Google Developers Console.
Declaration
[JsonProperty("private_key_id")]
public string PrivateKeyId { get; set; }
Property Value
Type | Description |
---|---|
string |
ProjectId
Project ID associated with this credential.
Declaration
[JsonProperty("project_id")]
public string ProjectId { get; set; }
Property Value
Type | Description |
---|---|
string |
QuotaProject
Project ID associated with this credential for the purposes of quota calculations and billing.
Declaration
[JsonProperty("quota_project_id")]
public string QuotaProject { get; set; }
Property Value
Type | Description |
---|---|
string |
RefreshToken
Refresh Token associated with UserCredential created by GCloud Auth Login.
Declaration
[JsonProperty("refresh_token")]
public string RefreshToken { get; set; }
Property Value
Type | Description |
---|---|
string |
ServiceAccountImpersonationUrl
This is the URL for the service account impersonation request associated with a source credential or with an external account credential. If this credential is an external account credential and this is not set, the STS returned access token should be directly used without impersonation. If this credential is not an external account credential and this is set, then a credential source needs to be specified.
Declaration
[JsonProperty("service_account_impersonation_url")]
public string ServiceAccountImpersonationUrl { get; set; }
Property Value
Type | Description |
---|---|
string |
SourceCredential
The source credential associated to the impersonated credential.
Declaration
[JsonProperty("source_credentials")]
public JsonCredentialParameters SourceCredential { get; set; }
Property Value
Type | Description |
---|---|
JsonCredentialParameters |
SubjectTokenType
The STS subject token type associated with an external account credential.
Declaration
[JsonProperty("subject_token_type")]
public string SubjectTokenType { get; set; }
Property Value
Type | Description |
---|---|
string |
TokenUri
The token endpoint for a service account credential.
Declaration
[JsonProperty("token_uri")]
public string TokenUri { get; set; }
Property Value
Type | Description |
---|---|
string |
Remarks
Note that this is different from TokenUrl which is the STS token exchange endpoint associated with an external account credential.
TokenUrl
The STS token exchange endpoint associated with an external account credential.
Declaration
[JsonProperty("token_url")]
public string TokenUrl { get; set; }
Property Value
Type | Description |
---|---|
string |
Remarks
Note that this is different from TokenUri which is the the token endpoint for a service account credential.
Type
Type of the credential.
Declaration
[JsonProperty("type")]
public string Type { get; set; }
Property Value
Type | Description |
---|---|
string |
UniverseDomain
Universe domain that this credential may be used in.
Declaration
[JsonProperty("universe_domain")]
public string UniverseDomain { get; set; }
Property Value
Type | Description |
---|---|
string |
WorkforcePoolUserProject
The GCP project number to be used for Workforce Pools external credentials.
Declaration
[JsonProperty("workforce_pool_user_project")]
public string WorkforcePoolUserProject { get; set; }
Property Value
Type | Description |
---|---|
string |
Remarks
If this external account credential represents a Workforce Pool enabled identity and this values is not specified, then an API key needs to be used alongside this credential to call Google APIs.