Skip to content

Commit 6804b7d

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

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

packages/google-cloud-node/src/v1/speech_client.ts

+7
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ export class SpeechClient {
128128
// Save the auth object to the client, for use by other methods.
129129
this.auth = this._gaxGrpc.auth as gax.GoogleAuth;
130130

131+
// Set useJWTAccessWithScope on the auth object.
132+
this.auth.useJWTAccessWithScope = true;
133+
134+
// Set defaultServicePath on the auth object.
135+
this.auth.defaultServicePath = staticMembers.servicePath;
136+
131137
// Set the default scopes in auth client if needed.
132138
if (servicePath === staticMembers.servicePath) {
133139
this.auth.defaultScopes = staticMembers.scopes;
@@ -587,6 +593,7 @@ export class SpeechClient {
587593
return this.speechStub!.then(stub => {
588594
this._terminated = true;
589595
stub.close();
596+
this.operationsClient.close();
590597
});
591598
}
592599
return Promise.resolve();

packages/google-cloud-node/src/v1p1beta1/adaptation_client.ts

+6
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,12 @@ export class AdaptationClient {
131131
// Save the auth object to the client, for use by other methods.
132132
this.auth = this._gaxGrpc.auth as gax.GoogleAuth;
133133

134+
// Set useJWTAccessWithScope on the auth object.
135+
this.auth.useJWTAccessWithScope = true;
136+
137+
// Set defaultServicePath on the auth object.
138+
this.auth.defaultServicePath = staticMembers.servicePath;
139+
134140
// Set the default scopes in auth client if needed.
135141
if (servicePath === staticMembers.servicePath) {
136142
this.auth.defaultScopes = staticMembers.scopes;

packages/google-cloud-node/src/v1p1beta1/speech_client.ts

+7
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@ export class SpeechClient {
129129
// Save the auth object to the client, for use by other methods.
130130
this.auth = this._gaxGrpc.auth as gax.GoogleAuth;
131131

132+
// Set useJWTAccessWithScope on the auth object.
133+
this.auth.useJWTAccessWithScope = true;
134+
135+
// Set defaultServicePath on the auth object.
136+
this.auth.defaultServicePath = staticMembers.servicePath;
137+
132138
// Set the default scopes in auth client if needed.
133139
if (servicePath === staticMembers.servicePath) {
134140
this.auth.defaultScopes = staticMembers.scopes;
@@ -711,6 +717,7 @@ export class SpeechClient {
711717
return this.speechStub!.then(stub => {
712718
this._terminated = true;
713719
stub.close();
720+
this.operationsClient.close();
714721
});
715722
}
716723
return Promise.resolve();

0 commit comments

Comments
 (0)