@midware/mauth
Version:
A simple auth middleware for Node.js
20 lines • 762 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const unauthorizedError_1 = __importDefault(require("./util/unauthorizedError"));
class KeyLess {
async verify(identification, identifications) {
console.log(identification);
console.log(identifications);
for (const rIdentification of identifications) {
if (identification.identification === rIdentification.identification)
return;
}
const error = new unauthorizedError_1.default();
throw error;
}
}
exports.default = KeyLess;
//# sourceMappingURL=keyless.js.map