forked from Mirrors/oauth2
fix: add ImpersonationURL check
This commit is contained in:
parent
e81efe311a
commit
5f31cd7a34
|
@ -186,7 +186,7 @@ func (f *credentialsFile) tokenSource(ctx context.Context, params CredentialsPar
|
|||
}
|
||||
return cfg.TokenSource(ctx)
|
||||
case impersonatedServiceAccount:
|
||||
if f.SourceCredentials == nil {
|
||||
if f.ServiceAccountImpersonationURL != "" && f.SourceCredentials == nil {
|
||||
return nil, errors.New("missing 'source_credentials' field in credentials")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue