/** * Session context - IP-based session management * (Implementation provided by middleware, just re-exported here) */ function createSessionContext(middlewareResult) { const { ipSessions, SESSION_DURATIONS, getClientIP, createIPSession, setSessionCookie, clearIPSession, clearSessionCookie, isSessionValid } = middlewareResult; return { ipSessions, durations: SESSION_DURATIONS, getClientIP, create: createIPSession, setCookie: setSessionCookie, clear: clearIPSession, clearCookie: clearSessionCookie, isValid: isSessionValid, }; } module.exports = { createSessionContext };