UNPKG

@cognigy/rest-api-client

Version:

Cognigy REST-Client

21 lines 821 B
import { __awaiter } from "tslib"; 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 = () => __awaiter(this, void 0, void 0, function* () { const headers = {}; headers["Authorization"] = `Bearer ${credentials.token}`; return headers; }); return new JwtTokenAuthentication(credentials, self); } }; export default JwtTokenAuthentication; //# sourceMappingURL=JwtTokenAuthentication.js.map