UNPKG

@linkedmink/passport-mutual-key-challenge

Version:

Implements a Passport strategy to authenticate the public key of a user by issuing a dynamic generated challenge

28 lines 1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isFunction = exports.isKeyObject = exports.isClientResponse = exports.isBuffer = exports.isString = exports.isPromise = void 0; function isPromise(toCheck) { return !!toCheck && toCheck.then !== undefined; } exports.isPromise = isPromise; function isString(toCheck) { return typeof toCheck === "string" || toCheck instanceof String; } exports.isString = isString; function isBuffer(toCheck) { return !!toCheck && toCheck.swap64 !== undefined; } exports.isBuffer = isBuffer; function isClientResponse(value) { return !!value && value.clientResponsed !== undefined; } exports.isClientResponse = isClientResponse; function isKeyObject(value) { return !!value && value.type !== undefined; } exports.isKeyObject = isKeyObject; function isFunction(value) { return !!value && value.call !== undefined; } exports.isFunction = isFunction; //# sourceMappingURL=TypeCheck.js.map