Skip to content

Commit

Permalink
feat: turns on self-signed JWT feature flag (#510)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 392067151

Source-Link: googleapis/googleapis@06345f7

Source-Link: googleapis/googleapis-gen@95882b3
  • Loading branch information
gcf-owl-bot[bot] authored Aug 23, 2021
1 parent e337fd1 commit e775f51
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/google-cloud-redis/src/v1/cloud_redis_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ export class CloudRedisClient {
// 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 Expand Up @@ -1896,6 +1902,7 @@ export class CloudRedisClient {
return this.cloudRedisStub!.then(stub => {
this._terminated = true;
stub.close();
this.operationsClient.close();
});
}
return Promise.resolve();
Expand Down
7 changes: 7 additions & 0 deletions packages/google-cloud-redis/src/v1beta1/cloud_redis_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ export class CloudRedisClient {
// 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 Expand Up @@ -1886,6 +1892,7 @@ export class CloudRedisClient {
return this.cloudRedisStub!.then(stub => {
this._terminated = true;
stub.close();
this.operationsClient.close();
});
}
return Promise.resolve();
Expand Down

0 comments on commit e775f51

Please sign in to comment.