(audience)
| 553 | }); |
| 554 | } |
| 555 | static getIDToken(audience) { |
| 556 | return __awaiter(this, void 0, void 0, function* () { |
| 557 | try { |
| 558 | // New ID Token is requested from action service |
| 559 | let id_token_url = OidcClient.getIDTokenUrl(); |
| 560 | if (audience) { |
| 561 | const encodedAudience = encodeURIComponent(audience); |
| 562 | id_token_url = `${id_token_url}&audience=${encodedAudience}`; |
| 563 | } |
| 564 | core_1.debug(`ID token url is ${id_token_url}`); |
| 565 | const id_token = yield OidcClient.getCall(id_token_url); |
| 566 | core_1.setSecret(id_token); |
| 567 | return id_token; |
| 568 | } |
| 569 | catch (error) { |
| 570 | throw new Error(`Error message: ${error.message}`); |
| 571 | } |
| 572 | }); |
| 573 | } |
| 574 | } |
| 575 | exports.OidcClient = OidcClient; |
| 576 | //# sourceMappingURL=oidc-utils.js.map |
no test coverage detected