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

Commit

Permalink
feat: turns on self-signed JWT feature flag (#942)
Browse files Browse the repository at this point in the history
  • Loading branch information
gcf-owl-bot[bot] authored Sep 7, 2021
1 parent b2e4aed commit c0558c7
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/v1/image_annotator_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ export class ImageAnnotatorClient {
// 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 @@ -1093,6 +1099,7 @@ export class ImageAnnotatorClient {
return this.imageAnnotatorStub!.then(stub => {
this._terminated = true;
stub.close();
this.operationsClient.close();
});
}
return Promise.resolve();
Expand Down
7 changes: 7 additions & 0 deletions src/v1/product_search_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ export class ProductSearchClient {
// 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 @@ -3091,6 +3097,7 @@ export class ProductSearchClient {
return this.productSearchStub!.then(stub => {
this._terminated = true;
stub.close();
this.operationsClient.close();
});
}
return Promise.resolve();
Expand Down
6 changes: 6 additions & 0 deletions src/v1p1beta1/image_annotator_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ export class ImageAnnotatorClient {
// 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
7 changes: 7 additions & 0 deletions src/v1p2beta1/image_annotator_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ export class ImageAnnotatorClient {
// 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 @@ -570,6 +576,7 @@ export class ImageAnnotatorClient {
return this.imageAnnotatorStub!.then(stub => {
this._terminated = true;
stub.close();
this.operationsClient.close();
});
}
return Promise.resolve();
Expand Down
7 changes: 7 additions & 0 deletions src/v1p3beta1/image_annotator_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ export class ImageAnnotatorClient {
// 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 @@ -765,6 +771,7 @@ export class ImageAnnotatorClient {
return this.imageAnnotatorStub!.then(stub => {
this._terminated = true;
stub.close();
this.operationsClient.close();
});
}
return Promise.resolve();
Expand Down
7 changes: 7 additions & 0 deletions src/v1p3beta1/product_search_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ export class ProductSearchClient {
// 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 @@ -3008,6 +3014,7 @@ export class ProductSearchClient {
return this.productSearchStub!.then(stub => {
this._terminated = true;
stub.close();
this.operationsClient.close();
});
}
return Promise.resolve();
Expand Down
7 changes: 7 additions & 0 deletions src/v1p4beta1/image_annotator_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ export class ImageAnnotatorClient {
// 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 @@ -1029,6 +1035,7 @@ export class ImageAnnotatorClient {
return this.imageAnnotatorStub!.then(stub => {
this._terminated = true;
stub.close();
this.operationsClient.close();
});
}
return Promise.resolve();
Expand Down
7 changes: 7 additions & 0 deletions src/v1p4beta1/product_search_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ export class ProductSearchClient {
// 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 @@ -3185,6 +3191,7 @@ export class ProductSearchClient {
return this.productSearchStub!.then(stub => {
this._terminated = true;
stub.close();
this.operationsClient.close();
});
}
return Promise.resolve();
Expand Down

0 comments on commit c0558c7

Please sign in to comment.