Skip to content

Commit 83c5099

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

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

packages/google-cloud-networkconnectivity/src/v1/hub_service_client.ts

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

138+
// Set useJWTAccessWithScope on the auth object.
139+
this.auth.useJWTAccessWithScope = true;
140+
141+
// Set defaultServicePath on the auth object.
142+
this.auth.defaultServicePath = staticMembers.servicePath;
143+
138144
// Set the default scopes in auth client if needed.
139145
if (servicePath === staticMembers.servicePath) {
140146
this.auth.defaultScopes = staticMembers.scopes;
@@ -2611,6 +2617,7 @@ export class HubServiceClient {
26112617
return this.hubServiceStub!.then(stub => {
26122618
this._terminated = true;
26132619
stub.close();
2620+
this.operationsClient.close();
26142621
});
26152622
}
26162623
return Promise.resolve();

packages/google-cloud-networkconnectivity/src/v1alpha1/hub_service_client.ts

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

139+
// Set useJWTAccessWithScope on the auth object.
140+
this.auth.useJWTAccessWithScope = true;
141+
142+
// Set defaultServicePath on the auth object.
143+
this.auth.defaultServicePath = staticMembers.servicePath;
144+
139145
// Set the default scopes in auth client if needed.
140146
if (servicePath === staticMembers.servicePath) {
141147
this.auth.defaultScopes = staticMembers.scopes;
@@ -2280,6 +2286,7 @@ export class HubServiceClient {
22802286
return this.hubServiceStub!.then(stub => {
22812287
this._terminated = true;
22822288
stub.close();
2289+
this.operationsClient.close();
22832290
});
22842291
}
22852292
return Promise.resolve();

0 commit comments

Comments
 (0)