ElixirAuthTagger
Inherits FrameworkTagger < FileHelper < Tagger < Reference < Object
Constants
ACTION_AUTH_PATTERNS = [{/conn\.assigns\.\w*current_user/, "Phoenix current_user check"}, {/Guardian\.Plug\.current_resource/, "Guardian current_resource"}, {/Pow\.Plug\.current_user/, "Pow current_user"}, {/get_session\s*\(\s*conn,\s*:user/, "Phoenix session user check"}]
Action-level auth checks
PIPELINE_AUTH_PATTERNS = [{/pipe_through\s+\[.*:authenticated/, "Phoenix :authenticated pipeline"}, {/pipe_through\s+:authenticated/, "Phoenix :authenticated pipeline"}, {/pipe_through\s+\[.*:auth/, "Phoenix :auth pipeline"}, {/pipe_through\s+:auth/, "Phoenix :auth pipeline"}]
Pipeline references
PLUG_AUTH_PATTERNS = [{/plug\s+:require_authenticated_user/, "Phoenix require_authenticated_user plug"}, {/plug\s+:authenticate/, "Phoenix authenticate plug"}, {/plug\s+:require_auth/, "Phoenix require_auth plug"}, {/plug\s+:ensure_authenticated/, "Phoenix ensure_authenticated plug"}, {/plug\s+:fetch_current_user/, "Phoenix fetch_current_user plug"}, {/plug\s+\w*[Aa]uth\w*/, "Phoenix auth plug"}]
Phoenix pipeline auth plugs
PLUG_MODULE_PATTERNS = [{/plug\s+\w+\.Auth/, "Phoenix Auth module plug"}, {/plug\s+\w+\.RequireAuth/, "Phoenix RequireAuth module plug"}, {/plug\s+\w+\.EnsureAuthenticated/, "Phoenix EnsureAuthenticated plug"}, {/plug\s+Guardian\.Plug\.EnsureAuthenticated/, "Guardian EnsureAuthenticated"}, {/plug\s+Guardian\.Plug\.VerifyHeader/, "Guardian VerifyHeader"}, {/plug\s+Pow\.Plug\.RequireAuthenticated/, "Pow RequireAuthenticated"}]
Plug-level auth (in router or controller)
Constructors
Class methods
target_techs
SourceInstance methods
The per-endpoint shape: look at each endpoint, tag in place, hand the
array back. Fifteen framework taggers carried a byte-identical copy of
this; they now declare only check_endpoint.
Not every framework tagger fits it — eleven still override perform
because they need a pre-scan over the project (config files, middleware
registration) before the per-endpoint pass, or they group endpoints
first. Those keep their own.