UNPKG

@cognigy/rest-api-client

Version:

Cognigy REST-Client

21 lines 805 B
import { __awaiter } from "tslib"; export const ApiKeyAuthentication = function (credentials, self) { if (!(this instanceof ApiKeyAuthentication)) { return new ApiKeyAuthentication(credentials, self); } else { self.credentials = { apiKey: credentials.apiKey, type: credentials.type }; const ApiKeyAuthentication = function () { }; ApiKeyAuthentication.prototype.getAuthenticationHeaders = () => __awaiter(this, void 0, void 0, function* () { const headers = {}; headers["x-api-key"] = credentials.apiKey || ""; return headers; }); return new ApiKeyAuthentication(credentials, self); } }; export default ApiKeyAuthentication; //# sourceMappingURL=ApiKeyAuthentication.js.map