class

AdonisjsAuthTagger

Inherits FrameworkTagger < FileHelper < Tagger < Reference < Object

Constants

AUTH_USE = /\.\s*use\s*\(\s*(?:['"]\*['"]\s*,\s*)?(?:\[\s*)?middleware\s*\.\s*auth\s*\(|\.\s*middleware\s*\(\s*(?:\{\s*['"]\*['"]\s*:\s*)?(?:\[\s*)?['"]auth(?::[\w,]+)?['"]/

The auth middleware on a route or group chain: v6 .use(middleware.auth()) (alone or first in a list, with or without { guards: [...] }), v5 .middleware('auth') / .middleware(['auth:api']), and a resource's for all its actions (.use('*', ...), v5 .middleware({ '*': ['auth'] })). silentAuth and guest let anonymous callers through, and a resource's per-action .use(['store'], ...) covers only some of its routes, so neither counts.

CHAINED_CALL = /\G\s*\.\s*[A-Za-z_$][\w$]*\s*\(/

A call chained on at the match position: .prefix('/api').

GROUP_CALL = /\.\s*group\s*\(/

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