lib/serverFxHandler.js
function (req, res, next) {
                // Delayed resolution of the isLoggedIn middleware.
                if (server.registry.has('localUserMiddleware')) {
                    const middleware = server.registry.get('localUserMiddleware');
                    middleware.isLoggedInMiddleware()(req, res, next);
                } else {
                    next(new restifyErrors.ForbiddenError(`Server configuration error, 'localUserMiddleware' not found.`));
                }
            }
function (req, res, next) {
                // Delayed resolution of the isLoggedIn middleware.
                if (server.registry.has('localUserMiddleware')) {
                    const middleware = server.registry.get('localUserMiddleware');
                    middleware.isLoggedInMiddleware()(req, res, next);
                } else {
                    next(new restifyErrors.ForbiddenError(`Server configuration error, 'localUserMiddleware' not found.`));
                }
            }
function ( req , res , next ) { // Delayed resolution of the isLoggedIn middleware. if ( server . registry . has ( 'localUserMiddleware' ) ) { const middleware = server . registry . get ( 'localUserMiddleware' ) ; middleware . isLoggedInMiddleware ( ) ( req , res , next ) ; } else { next ( new restifyErrors . ForbiddenError ( ` ` ) ) ; } }
Make sure User is authenticated
Make sure User is authenticated