Crypto Server
    Preparing search index...

    Function authenticate

    • Authenticate a request. Checks (in order):

      1. Bearer JWT token in Authorization header
      2. API key in x-api-key header
      3. If neither configured, allow all (dev mode)

      Returns the authenticated payload or sends 401.

      Parameters

      • request: FastifyRequest
      • reply: FastifyReply

      Returns Promise<AuthPayload | null>