Stone.js API
    Preparing search index...

    Kernel/route middleware that authenticates the request from its Authorization: Bearer token.

    If a token is present it is verified (an invalid/expired token raises AuthenticationError401); the verified claims are stored on the event (auth metadata) and the mapped principal is exposed via event.getUser(). If no token is present the request continues anonymously — enforce presence per route with requireAuth() / requireScopes().

    Index
    • Parameters

      • event: IncomingHttpEvent

        The incoming event.

      • next: NextMiddleware<IncomingHttpEvent, OutgoingHttpResponse>

        The next middleware.

      Returns Promise<OutgoingHttpResponse>

      The outgoing response.