navy
Version:
Quick and powerful development environments using Docker and Docker Compose
19 lines (14 loc) • 450 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.basicAuthentication = void 0;
var _ramda = require("ramda");
const basicAuthentication = credentials => {
if ((0, _ramda.isEmpty)(credentials)) {
return null;
}
const parameters = Buffer.from(`${credentials.username}:${credentials.password}`).toString('base64');
return `Basic ${parameters}`;
};
exports.basicAuthentication = basicAuthentication;