From 224dd43caf8611175d3f7fc0d32aa1e113dee6ae Mon Sep 17 00:00:00 2001 From: guillaume blaquiere Date: Mon, 23 Aug 2021 11:01:37 +0200 Subject: [PATCH] docs: ImpersonateTokenSource description The refactor made ImpersonateTokenSource public. Short explanation of each fields. Updates #515 --- google/internal/externalaccount/impersonate.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/google/internal/externalaccount/impersonate.go b/google/internal/externalaccount/impersonate.go index ee50ad8..cea9458 100644 --- a/google/internal/externalaccount/impersonate.go +++ b/google/internal/externalaccount/impersonate.go @@ -29,11 +29,17 @@ type impersonateTokenResponse struct { 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 { + // execution 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 }