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
parent 121de73b38
commit 2fca3adf8d
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
// source credential
Ts oauth2.TokenSource Ts oauth2.TokenSource
// impersonation url to request an access token
Url string Url string
// scopes to include in the access token request
Scopes []string Scopes []string
} }