UNPKG

@cognigy/rest-api-client

Version:

Cognigy REST-Client

22 lines 826 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const JwtTokenAuthentication = function (credentials, self) { if (!(this instanceof JwtTokenAuthentication)) { return new JwtTokenAuthentication(credentials, self); } else { self.credentials = { token: credentials.token, type: credentials.type }; const JwtTokenAuthentication = function () { }; JwtTokenAuthentication.prototype.getAuthenticationHeaders = async () => { const headers = {}; headers["Authorization"] = `Bearer ${credentials.token}`; return headers; }; return new JwtTokenAuthentication(credentials, self); } }; exports.default = JwtTokenAuthentication; //# sourceMappingURL=JwtTokenAuthentication.js.map