Documentation ¶
Overview ¶
Package actas provides a TokenSource that returns access tokens that impersonate a different service account other than the default app credentials.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenSource ¶
type TokenSource struct {
// contains filtered or unexported fields
}
TokenSource is an oauth2.TokenSource implementation that provides impersonated credentials. The current implementation uses the application default credentials to sign for the impersonated credentials. This means whatever service account is running the code needs to be a member in the ServiceAccountTokenCreator role for the impersonated service account.
func NewTokenSource ¶
func NewTokenSource(ctx context.Context, cred credentials.PerRPCCredentials, client *http.Client, actAsAccount string, scopes []string) *TokenSource
NewTokenSource returns a impersonated credentials token source.
Click to show internal directories.
Click to hide internal directories.