Class ImpersonatedCredential.Initializer (1.55.0)

public sealed class Initializer : ServiceCredential.Initializer

An initializer class for the impersonated credential.

Inheritance

Object > ServiceCredential.Initializer > ImpersonatedCredential.Initializer

Namespace

Google.Apis.Auth.OAuth2

Assembly

Google.Apis.Auth.dll

Constructors

Initializer(String)

public Initializer(string targetPrincipal)

Constructs a new initializer.

Parameter
NameDescription
targetPrincipalString

The principal that will be impersonated. Must not be null.

Properties

DelegateAccounts

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

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

Property Value
TypeDescription
IEnumerable<String>

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
TypeDescription
TimeSpan

Scopes

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

Gets the scopes to request during the authorization grant. May be null or empty.

Property Value
TypeDescription
IEnumerable<String>

TargetPrincipal

public string TargetPrincipal { get; }

Gets the service account to impersonate.

Property Value
TypeDescription
String

Extension Method