Merge branch 'service-account-impersonation' of github.com:gIthuriel/oauth2 into service-account-impersonation

Change-Id: Ie55c0997b30b0145d4656227cff7ba08f75c99f9
This commit is contained in:
Patrick Jones 2021-01-19 16:39:38 -08:00
commit 82b3f13abd
1 changed files with 1 additions and 0 deletions

View File

@ -27,6 +27,7 @@ type impersonateTokenResponse struct {
ExpireTime string `json:"expireTime"` ExpireTime string `json:"expireTime"`
} }
// impersonate performs the exchange to get a temporary service account
func (ts tokenSource) impersonate() (*oauth2.Token, error) { func (ts tokenSource) impersonate() (*oauth2.Token, error) {
reqBody := generateAccessTokenReq{ reqBody := generateAccessTokenReq{
Lifetime: "3600s", Lifetime: "3600s",