class

HonoAuthTagger

Inherits PrefixScope < FrameworkTagger < FileHelper < Tagger < Reference < Object

Constants

CONTEXT_USER_PATTERNS = [/c\.var\.(user|payload|auth|session)/, /c\.get\s*\(\s*['"](user|payload|auth|session)/]

Context user extraction after auth (secondary signal)

CUSTOM_AUTH_NAMES = [/\bauthMiddleware\b/i, /\bauthGuard\b/i, /\brequireAuth\b/i, /\bverifyToken\b/i, /\bcheckAuth\b/i, /\bensureAuth\b/i, /\bwithAuth\b/i]

Custom or third-party auth middleware names commonly used with Hono

HONO_AUTH_MIDDLEWARE = [{/\bbearerAuth\s*\(/, "Hono bearerAuth middleware"}, {/\bjwt\s*\(/, "Hono jwt middleware"}, {/\bbasicAuth\s*\(/, "Hono basicAuth middleware"}]

Hono official auth middleware

ROUTE_DECLARATION = /\.\s*(?:get|post|put|patch|delete|options|head|all|on|use|route)\s*\(/

The start of a route registration: a window around one route stops here so it never reads the neighbouring route's middleware or handler.

Constructors

new(options : Hash(String, YAML::Any))
Source

Class methods

target_techs
Source

Instance methods

perform(endpoints : Array(Endpoint)) : Array(Endpoint)

The per-endpoint shape: look at each endpoint, tag in place, hand the array back. Taggers declare only check_endpoint; those that need a pass over the whole set first (a project pre-scan, mcp's legacy prefixes) override perform and call super or loop themselves.

Source