Skip to content

Commit e775f51

Browse files
feat: turns on self-signed JWT feature flag (#510)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 392067151 Source-Link: googleapis/googleapis@06345f7 Source-Link: googleapis/googleapis-gen@95882b3
1 parent e337fd1 commit e775f51

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

packages/google-cloud-redis/src/v1/cloud_redis_client.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,12 @@ export class CloudRedisClient {
147147
// Save the auth object to the client, for use by other methods.
148148
this.auth = this._gaxGrpc.auth as gax.GoogleAuth;
149149

150+
// Set useJWTAccessWithScope on the auth object.
151+
this.auth.useJWTAccessWithScope = true;
152+
153+
// Set defaultServicePath on the auth object.
154+
this.auth.defaultServicePath = staticMembers.servicePath;
155+
150156
// Set the default scopes in auth client if needed.
151157
if (servicePath === staticMembers.servicePath) {
152158
this.auth.defaultScopes = staticMembers.scopes;
@@ -1896,6 +1902,7 @@ export class CloudRedisClient {
18961902
return this.cloudRedisStub!.then(stub => {
18971903
this._terminated = true;
18981904
stub.close();
1905+
this.operationsClient.close();
18991906
});
19001907
}
19011908
return Promise.resolve();

packages/google-cloud-redis/src/v1beta1/cloud_redis_client.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,12 @@ export class CloudRedisClient {
147147
// Save the auth object to the client, for use by other methods.
148148
this.auth = this._gaxGrpc.auth as gax.GoogleAuth;
149149

150+
// Set useJWTAccessWithScope on the auth object.
151+
this.auth.useJWTAccessWithScope = true;
152+
153+
// Set defaultServicePath on the auth object.
154+
this.auth.defaultServicePath = staticMembers.servicePath;
155+
150156
// Set the default scopes in auth client if needed.
151157
if (servicePath === staticMembers.servicePath) {
152158
this.auth.defaultScopes = staticMembers.scopes;
@@ -1886,6 +1892,7 @@ export class CloudRedisClient {
18861892
return this.cloudRedisStub!.then(stub => {
18871893
this._terminated = true;
18881894
stub.close();
1895+
this.operationsClient.close();
18891896
});
18901897
}
18911898
return Promise.resolve();

0 commit comments

Comments
 (0)