Documentation

Overview

    Package impersonate is used to impersonate Google Credentials.

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    func TokenSource

    func TokenSource(ctx context.Context, ts oauth2.TokenSource, config *Config) (oauth2.TokenSource, error)

      TokenSource returns an impersonated TokenSource configured with the provided config using ts as the base credential provider for making requests.

      Types

      type Config

      type Config struct {
      	// Target is the service account to impersonate. Required.
      	Target string
      	// Scopes the impersonated credential should have. Required.
      	Scopes []string
      	// Delegates are the service accounts in a delegation chain. Each service
      	// account must be granted roles/iam.serviceAccountTokenCreator on the next
      	// service account in the chain. Optional.
      	Delegates []string
      }

        Config for generating impersonated credentials.

        Source Files