docs: ImpersonateTokenSource description

The refactor made ImpersonateTokenSource public. Short explanation of each fields.

Updates #515
This commit is contained in:
guillaume blaquiere 2021-08-23 11:01:37 +02:00 committed by Guillaume Blaquiere
parent 3c21182782
commit 224dd43caf
1 changed files with 8 additions and 2 deletions

View File

@ -29,11 +29,17 @@ type impersonateTokenResponse struct {
ExpireTime string `json:"expireTime"` ExpireTime string `json:"expireTime"`
} }
// ImpersonateTokenSource uses a source credential, stored in Ts, to request an access token to the provided Url
// Scopes can be defined when the access token is requested.
type ImpersonateTokenSource struct { type ImpersonateTokenSource struct {
// execution context
Ctx context.Context Ctx context.Context
Ts oauth2.TokenSource // source credential
Ts oauth2.TokenSource
Url string // impersonation url to request an access token
Url string
// scopes to include in the access token request
Scopes []string Scopes []string
} }