Skip to content

Commit 9eda47e

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

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed

packages/google-cloud-automl/src/v1/auto_ml_client.ts

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

149+
// Set useJWTAccessWithScope on the auth object.
150+
this.auth.useJWTAccessWithScope = true;
151+
152+
// Set defaultServicePath on the auth object.
153+
this.auth.defaultServicePath = staticMembers.servicePath;
154+
149155
// Set the default scopes in auth client if needed.
150156
if (servicePath === staticMembers.servicePath) {
151157
this.auth.defaultScopes = staticMembers.scopes;
@@ -3315,6 +3321,7 @@ export class AutoMlClient {
33153321
return this.autoMlStub!.then(stub => {
33163322
this._terminated = true;
33173323
stub.close();
3324+
this.operationsClient.close();
33183325
});
33193326
}
33203327
return Promise.resolve();

packages/google-cloud-automl/src/v1/prediction_service_client.ts

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

135+
// Set useJWTAccessWithScope on the auth object.
136+
this.auth.useJWTAccessWithScope = true;
137+
138+
// Set defaultServicePath on the auth object.
139+
this.auth.defaultServicePath = staticMembers.servicePath;
140+
135141
// Set the default scopes in auth client if needed.
136142
if (servicePath === staticMembers.servicePath) {
137143
this.auth.defaultScopes = staticMembers.scopes;
@@ -994,6 +1000,7 @@ export class PredictionServiceClient {
9941000
return this.predictionServiceStub!.then(stub => {
9951001
this._terminated = true;
9961002
stub.close();
1003+
this.operationsClient.close();
9971004
});
9981005
}
9991006
return Promise.resolve();

packages/google-cloud-automl/src/v1beta1/auto_ml_client.ts

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

149+
// Set useJWTAccessWithScope on the auth object.
150+
this.auth.useJWTAccessWithScope = true;
151+
152+
// Set defaultServicePath on the auth object.
153+
this.auth.defaultServicePath = staticMembers.servicePath;
154+
149155
// Set the default scopes in auth client if needed.
150156
if (servicePath === staticMembers.servicePath) {
151157
this.auth.defaultScopes = staticMembers.scopes;
@@ -4345,6 +4351,7 @@ export class AutoMlClient {
43454351
return this.autoMlStub!.then(stub => {
43464352
this._terminated = true;
43474353
stub.close();
4354+
this.operationsClient.close();
43484355
});
43494356
}
43504357
return Promise.resolve();

packages/google-cloud-automl/src/v1beta1/prediction_service_client.ts

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

135+
// Set useJWTAccessWithScope on the auth object.
136+
this.auth.useJWTAccessWithScope = true;
137+
138+
// Set defaultServicePath on the auth object.
139+
this.auth.defaultServicePath = staticMembers.servicePath;
140+
135141
// Set the default scopes in auth client if needed.
136142
if (servicePath === staticMembers.servicePath) {
137143
this.auth.defaultScopes = staticMembers.scopes;
@@ -1112,6 +1118,7 @@ export class PredictionServiceClient {
11121118
return this.predictionServiceStub!.then(stub => {
11131119
this._terminated = true;
11141120
stub.close();
1121+
this.operationsClient.close();
11151122
});
11161123
}
11171124
return Promise.resolve();

0 commit comments

Comments
 (0)