Class ImpersonatedCredential.Initializer (1.68.0)

public sealed class ImpersonatedCredential.Initializer : ServiceCredential.Initializer

An initializer class for the impersonated credential.

Inheritance

object > ServiceCredentialInitializer > ImpersonatedCredential.Initializer

Namespace

Google.Apis.Auth.OAuth2

Assembly

Google.Apis.Auth.dll

Constructors

Initializer(string)

public Initializer(string targetPrincipal)

Constructs a new initializer.

Parameter
Name Description
targetPrincipal string

The principal that will be impersonated. Must not be null, as it will be used to build the URL to obtaing the impersonated access token from.

Properties

DelegateAccounts

public IEnumerable<string> DelegateAccounts { get; set; }

Gets the chained list of delegate service accounts. May be null or empty.

Property Value
Type Description
IEnumerablestring

Lifetime

public TimeSpan Lifetime { get; set; }

Gets or sets for how long the delegated credential should be valid. Defaults to 1 hour or 3600 seconds.

Property Value
Type Description
TimeSpan

TargetPrincipal

public string TargetPrincipal { get; }

Gets the service account to impersonate.

Property Value
Type Description
string

Extension Method