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