Setu-TS
    Preparing search index...

    Function authMiddleware

    • Authentication middleware that runs passive strategies and populates ctx.request.user. Always calls next() - it authenticates only, does not authorize.

      Returns MiddlewareFunction

      Middleware function

      // AuthPlugin registers this globally by default. Disable that registration
      // only when attaching authentication to selected routes yourself.
      app.register(AuthPlugin({ apiKey: { validate }, middleware: false }));
      app.router.get('/private', { middleware: [authMiddleware()], handler });