UNPKG

@sphereon/ssi-sdk-ext.kms-azure-rest-client

Version:

Sphereon SSI-SDK plugin for Azure KeyVault Key Management System.

31 lines 1.16 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.servers = exports.server1 = exports.ServerConfiguration = void 0; const http_1 = require("./http/http"); class ServerConfiguration { constructor(url, variableConfiguration) { this.url = url; this.variableConfiguration = variableConfiguration; } setVariables(variableConfiguration) { Object.assign(this.variableConfiguration, variableConfiguration); } getConfiguration() { return this.variableConfiguration; } getUrl() { let replacedUrl = this.url; for (const [key, value] of Object.entries(this.variableConfiguration)) { replacedUrl = replacedUrl.replaceAll(`{${key}}`, value); } return replacedUrl; } makeRequestContext(endpoint, httpMethod) { return new http_1.RequestContext(this.getUrl() + endpoint, httpMethod); } } exports.ServerConfiguration = ServerConfiguration; exports.server1 = new ServerConfiguration("http://localhost:8080", {}); exports.servers = [exports.server1]; //# sourceMappingURL=servers.js.map //# sourceMappingURL=servers.js.map