Skip to content

Commit a42c88e

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

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/v1/datastore_admin_client.ts

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

195+
// Set useJWTAccessWithScope on the auth object.
196+
this.auth.useJWTAccessWithScope = true;
197+
198+
// Set defaultServicePath on the auth object.
199+
this.auth.defaultServicePath = staticMembers.servicePath;
200+
195201
// Set the default scopes in auth client if needed.
196202
if (servicePath === staticMembers.servicePath) {
197203
this.auth.defaultScopes = staticMembers.scopes;
@@ -1368,6 +1374,7 @@ export class DatastoreAdminClient {
13681374
return this.datastoreAdminStub!.then(stub => {
13691375
this._terminated = true;
13701376
stub.close();
1377+
this.operationsClient.close();
13711378
});
13721379
}
13731380
return Promise.resolve();

src/v1/datastore_client.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ export class DatastoreClient {
127127
// Save the auth object to the client, for use by other methods.
128128
this.auth = this._gaxGrpc.auth as gax.GoogleAuth;
129129

130+
// Set useJWTAccessWithScope on the auth object.
131+
this.auth.useJWTAccessWithScope = true;
132+
133+
// Set defaultServicePath on the auth object.
134+
this.auth.defaultServicePath = staticMembers.servicePath;
135+
130136
// Set the default scopes in auth client if needed.
131137
if (servicePath === staticMembers.servicePath) {
132138
this.auth.defaultScopes = staticMembers.scopes;

0 commit comments

Comments
 (0)