forked from Mirrors/oauth2
improve: ts is already wrapped in ReuseTokenSource. Imp is now wrapped.
This commit is contained in:
parent
4769fc9387
commit
6f4df59c51
|
@ -198,10 +198,10 @@ func (f *credentialsFile) tokenSource(ctx context.Context, params CredentialsPar
|
||||||
Ctx: ctx,
|
Ctx: ctx,
|
||||||
URL: f.ServiceAccountImpersonationURL,
|
URL: f.ServiceAccountImpersonationURL,
|
||||||
Scopes: params.Scopes,
|
Scopes: params.Scopes,
|
||||||
Ts: oauth2.ReuseTokenSource(nil, ts),
|
Ts: ts,
|
||||||
Delegates: f.Delegates,
|
Delegates: f.Delegates,
|
||||||
}
|
}
|
||||||
return imp, nil
|
return oauth2.ReuseTokenSource(nil, imp), nil
|
||||||
case "":
|
case "":
|
||||||
return nil, errors.New("missing 'type' field in credentials")
|
return nil, errors.New("missing 'type' field in credentials")
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue