@wristband/express-auth
Version:
SDK for integrating your ExpressJS application with Wristband. Handles user authentication, session management, and token management.
37 lines (36 loc) • 2.33 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.createWristbandJwtValidator = exports.SessionErrorCode = exports.SessionError = exports.createWristbandSession = exports.WristbandError = exports.discoverWristbandAuth = exports.createWristbandAuth = void 0;
const error_1 = require("./error");
Object.defineProperty(exports, "WristbandError", { enumerable: true, get: function () { return error_1.WristbandError; } });
const factory_1 = require("./factory");
Object.defineProperty(exports, "createWristbandAuth", { enumerable: true, get: function () { return factory_1.createWristbandAuth; } });
Object.defineProperty(exports, "discoverWristbandAuth", { enumerable: true, get: function () { return factory_1.discoverWristbandAuth; } });
/**
* Session middleware export
*
* NOTE: This export uses inline re-export syntax to ensure the session module
* is only loaded when explicitly imported. This prevents the Express.Request type
* augmentation from being applied to users who only use auth features without session
* middleware, avoiding type conflicts with other session libraries.
*
* When imported, this automatically augments Express.Request with the `session` property.
*/
var session_1 = require("./session");
Object.defineProperty(exports, "createWristbandSession", { enumerable: true, get: function () { return session_1.createWristbandSession; } });
/**
* Session error class exports
*
* ⚠️ WARNING: These are runtime value exports. Importing them will load the
* @wristband/typescript-session module and trigger Express.Request augmentation.
*
* Only import these if you're using createWristbandSession() middleware.
*/
var typescript_session_1 = require("@wristband/typescript-session");
Object.defineProperty(exports, "SessionError", { enumerable: true, get: function () { return typescript_session_1.SessionError; } });
Object.defineProperty(exports, "SessionErrorCode", { enumerable: true, get: function () { return typescript_session_1.SessionErrorCode; } });
/**
* Re-export JWT validator factory from typescript-jwt (runtime value)
*/
var typescript_jwt_1 = require("@wristband/typescript-jwt");
Object.defineProperty(exports, "createWristbandJwtValidator", { enumerable: true, get: function () { return typescript_jwt_1.createWristbandJwtValidator; } });