UNPKG

axis-core

Version:

A Node.js library written in TypeScript containing shared behavior for the other packages, e.g. code handling communication and authentication with Axis Communication cameras.

13 lines 467 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createHeader = exports.BASIC = void 0; exports.BASIC = 'Basic'; const createHeader = (username, password, challenge) => { const credentials = base64(`${username}:${password}`); return `${challenge.type} ${credentials}`; }; exports.createHeader = createHeader; const base64 = (value) => { return Buffer.from(value).toString('base64'); }; //# sourceMappingURL=basic.js.map