UNPKG

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

Version:

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

23 lines 654 B
export class ApiKeySchemeAuthentication { constructor(apiKey) { this.apiKey = apiKey; } getName() { return "apiKeyScheme"; } applySecurityAuthentication(context) { context.setHeaderParam("X-API-KEY", this.apiKey); } } export function configureAuthMethods(config) { let authMethods = {}; if (!config) { return authMethods; } authMethods["default"] = config["default"]; if (config["apiKeyScheme"]) { authMethods["apiKeyScheme"] = new ApiKeySchemeAuthentication(config["apiKeyScheme"]); } return authMethods; } //# sourceMappingURL=auth.js.map