Skip to content

Commit

Permalink
fix(cba): Update newAuth path to use nil oauth2 client (#2684)
Browse files Browse the repository at this point in the history
  • Loading branch information
andyrzhao committed Jul 11, 2024
1 parent 1e3757d commit d925dcb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
7 changes: 0 additions & 7 deletions transport/grpc/dial.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,6 @@ func dialPoolNewAuth(ctx context.Context, secure bool, poolSize int, ds *interna
defaultEndpointTemplate = ds.DefaultEndpoint
}

tokenURL, oauth2Client, err := internal.GetOAuth2Configuration(ctx, ds)
if err != nil {
return nil, err
}

pool, err := grpctransport.Dial(ctx, secure, &grpctransport.Options{
DisableTelemetry: ds.TelemetryDisabled,
DisableAuthentication: ds.NoAuth,
Expand All @@ -237,8 +232,6 @@ func dialPoolNewAuth(ctx context.Context, secure bool, poolSize int, ds *interna
Audience: aud,
CredentialsFile: ds.CredentialsFile,
CredentialsJSON: ds.CredentialsJSON,
TokenURL: tokenURL,
Client: oauth2Client,
},
InternalOptions: &grpctransport.InternalOptions{
EnableNonDefaultSAForDirectPath: ds.AllowNonDefaultServiceAccount,
Expand Down
6 changes: 0 additions & 6 deletions transport/http/dial.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@ func newClientNewAuth(ctx context.Context, base http.RoundTripper, ds *internal.
if ds.RequestReason != "" {
headers.Set("X-goog-request-reason", ds.RequestReason)
}
tokenURL, oauth2Client, err := internal.GetOAuth2Configuration(ctx, ds)
if err != nil {
return nil, err
}
client, err := httptransport.NewClient(&httptransport.Options{
DisableTelemetry: ds.TelemetryDisabled,
DisableAuthentication: ds.NoAuth,
Expand All @@ -125,8 +121,6 @@ func newClientNewAuth(ctx context.Context, base http.RoundTripper, ds *internal.
Audience: aud,
CredentialsFile: ds.CredentialsFile,
CredentialsJSON: ds.CredentialsJSON,
TokenURL: tokenURL,
Client: oauth2Client,
},
InternalOptions: &httptransport.InternalOptions{
EnableJWTWithScope: ds.EnableJwtWithScope,
Expand Down

0 comments on commit d925dcb

Please sign in to comment.