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

Method getCall

lib/index.js:537–554  ·  view source on GitHub ↗
(id_token_url)

Source from the content-addressed store, hash-verified

535 return runtimeUrl;
536 }
537 static getCall(id_token_url) {
538 var _a;
539 return __awaiter(this, void 0, void 0, function* () {
540 const httpclient = OidcClient.createHttpClient();
541 const res = yield httpclient
542 .getJson(id_token_url)
543 .catch(error => {
544 throw new Error(`Failed to get ID Token. \n
545 Error Code : ${error.statusCode}\n
546 Error Message: ${error.result.message}`);
547 });
548 const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
549 if (!id_token) {
550 throw new Error('Response json body do not have ID Token field');
551 }
552 return id_token;
553 });
554 }
555 static getIDToken(audience) {
556 return __awaiter(this, void 0, void 0, function* () {
557 try {

Callers 1

getIDTokenMethod · 0.80

Calls 2

createHttpClientMethod · 0.80
getJsonMethod · 0.80

Tested by

no test coverage detected