drupflare/worker - v1.0.0
    Preparing search index...

    Function decideAuthMode

    • Decides how to answer one authenticated request.

      Parameters

      • request: { method: string }

        needs only the method

      • spend: AuthSpend | null | undefined

        the durable counter, or null when it has not been read yet

      • Optionalenv: AuthBudgetEnv | null

        carries PLAN and the overrides

      • now: number = ...

        injectable so the UTC-day rollover is testable

      Returns AuthDecision