Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
...pipelineOptions,
...{
loggingOptions: {
logger: logger.info,
logPolicyOptions: {
allowedHeaderNames: [
"x-ms-keyvault-region",
"x-ms-keyvault-network-info",
"x-ms-keyvault-service-version"
]
}
}
}
};
const pipeline = createPipelineFromOptions(internalPipelineOptions, authPolicy);
this.client = new KeyVaultClient(credential, SERVICE_API_VERSION, pipeline);
}
constructor(options?: TokenCredentialOptions) {
options = options || IdentityClient.getDefaultOptions();
super(undefined, createPipelineFromOptions(options));
this.baseUri = this.authorityHost = options.authorityHost || DefaultAuthorityHost;
if (!this.baseUri.startsWith("https:")) {
throw new Error("The authorityHost address must use the 'https' protocol.");
}
}
...pipelineOptions,
...{
loggingOptions: {
logger: logger.info,
logPolicyOptions: {
allowedHeaderNames: [
"x-ms-keyvault-region",
"x-ms-keyvault-network-info",
"x-ms-keyvault-service-version"
]
}
}
}
};
const pipeline = createPipelineFromOptions(internalPipelineOptions, authPolicy);
this.client = new KeyVaultClient(credential, SERVICE_API_VERSION, pipeline);
let parsed;
if (typeof key === "string") {
this.key = key;
parsed = parseKeyvaultIdentifier("keys", this.key);
this.hasTriedToGetKey = false;
} else if (key.key) {
this.key = key.key;
parsed = parseKeyvaultIdentifier("keys", this.key.kid!);
this.hasTriedToGetKey = true;
} else {
throw new Error(
"The provided key is malformed as it does not have a value for the `key` property."
);
}
...pipelineOptions,
...{
loggingOptions: {
logger: logger.info,
logPolicyOptions: {
allowedHeaderNames: [
"x-ms-keyvault-region",
"x-ms-keyvault-network-info",
"x-ms-keyvault-service-version"
]
}
}
}
};
const pipeline = createPipelineFromOptions(internalPipelineOptions, authPolicy);
this.client = new KeyVaultClient(credential, SERVICE_API_VERSION, pipeline);
}
...pipelineOptions,
...{
loggingOptions: {
logger: logger.info,
logPolicyOptions: {
allowedHeaderNames: [
"x-ms-keyvault-region",
"x-ms-keyvault-network-info",
"x-ms-keyvault-service-version"
]
}
}
}
};
this.pipeline = createPipelineFromOptions(internalPipelineOptions, authPolicy);
this.client = new KeyVaultClient(credential, SERVICE_API_VERSION, this.pipeline);
}