Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

feat: turns on self-signed JWT feature flag #490

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/v1/key_management_service_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ export class KeyManagementServiceClient {
// Save the auth object to the client, for use by other methods.
this.auth = this._gaxGrpc.auth as gax.GoogleAuth;

// Set useJWTAccessWithScope on the auth object.
this.auth.useJWTAccessWithScope = true;

// Set defaultServicePath on the auth object.
this.auth.defaultServicePath = staticMembers.servicePath;

// Set the default scopes in auth client if needed.
if (servicePath === staticMembers.servicePath) {
this.auth.defaultScopes = staticMembers.scopes;
Expand Down Expand Up @@ -4090,6 +4096,7 @@ export class KeyManagementServiceClient {
return this.keyManagementServiceStub!.then(stub => {
this._terminated = true;
stub.close();
this.iamClient.close();
});
}
return Promise.resolve();
Expand Down