Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var metadata: any = await retry(async bail => {
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
var reader: any = await fetch({ url });
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "1";
if (reader === null || reader === undefined) { bail(new Error("Failed getting result")); return; }
var config: any = toPassportConfig(reader);
// we need this, for Office 365 :-/
if (reader.signingCerts && reader.signingCerts.length > 1) {
config.cert = reader.signingCerts;
}
return config;
}, {
retries: 50,
var metadata: any = await retry(async bail => {
var reader: any = await fetch({ url });
if (Util.IsNullUndefinded(reader)) { bail(new Error("Failed getting result")); return; }
var config: any = toPassportConfig(reader);
// we need this, for Office 365 :-/
if (reader.signingCerts && reader.signingCerts.length > 1) {
config.cert = reader.signingCerts;
}
return config;
}, {
retries: 50,