Skip to content

Commit

Permalink
feat: turns on self-signed JWT feature flag (#1140)
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 392067151
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Benjamin E. Coe <[email protected]>
  • Loading branch information
3 people authored Sep 8, 2021
1 parent b361673 commit dc15213
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/v2/config_service_v2_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ export class ConfigServiceV2Client {
// Save the auth object to the client, for use by other methods.
this.auth = this._gaxGrpc.auth as gax.GoogleAuth;

// Set useJWTAccessWithScope on the auth object.
this.auth.useJWTAccessWithScope = true;

// Set defaultServicePath on the auth object.
this.auth.defaultServicePath = staticMembers.servicePath;

// Set the default scopes in auth client if needed.
if (servicePath === staticMembers.servicePath) {
this.auth.defaultScopes = staticMembers.scopes;
Expand Down
6 changes: 6 additions & 0 deletions src/v2/logging_service_v2_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ export class LoggingServiceV2Client {
// Save the auth object to the client, for use by other methods.
this.auth = this._gaxGrpc.auth as gax.GoogleAuth;

// Set useJWTAccessWithScope on the auth object.
this.auth.useJWTAccessWithScope = true;

// Set defaultServicePath on the auth object.
this.auth.defaultServicePath = staticMembers.servicePath;

// Set the default scopes in auth client if needed.
if (servicePath === staticMembers.servicePath) {
this.auth.defaultScopes = staticMembers.scopes;
Expand Down
6 changes: 6 additions & 0 deletions src/v2/metrics_service_v2_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ export class MetricsServiceV2Client {
// Save the auth object to the client, for use by other methods.
this.auth = this._gaxGrpc.auth as gax.GoogleAuth;

// Set useJWTAccessWithScope on the auth object.
this.auth.useJWTAccessWithScope = true;

// Set defaultServicePath on the auth object.
this.auth.defaultServicePath = staticMembers.servicePath;

// Set the default scopes in auth client if needed.
if (servicePath === staticMembers.servicePath) {
this.auth.defaultScopes = staticMembers.scopes;
Expand Down

0 comments on commit dc15213

Please sign in to comment.