MCPcopy Create free account
hub / github.com/Azure/powershell / getIDToken

Method getIDToken

lib/index.js:555–573  ·  view source on GitHub ↗
(audience)

Source from the content-addressed store, hash-verified

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}
575exports.OidcClient = OidcClient;
576//# sourceMappingURL=oidc-utils.js.map

Callers 1

getIDTokenFunction · 0.80

Calls 2

getIDTokenUrlMethod · 0.80
getCallMethod · 0.80

Tested by

no test coverage detected