CrystalAuthTagger
Inherits FrameworkTagger < FileHelper < Tagger < Reference < Object
Constants
AMBER_AUTH_PATTERNS = [{/pipeline\s+:auth/, "Amber :auth pipeline"}, {/plug\s+Authenticate/, "Amber Authenticate plug"}, {/plug\s+\w*[Aa]uth\w*/, "Amber auth plug"}]
Amber auth pipe patterns
ENCLOSING_AUTH_PATTERNS = ((AMBER_AUTH_PATTERNS + KEMAL_FILTER_PATTERNS) + LUCKY_AUTH_PATTERNS) + GENERIC_FILTER_PATTERNS
Read walking back from the route to its class/module: statements that cover every route declared after them in that scope. A session read is not one — it guards only the handler it sits in, and walking back to it spread one route's check to every later route of the file.
GENERIC_FILTER_PATTERNS = [{/before_action.*auth/i, "Crystal before_action auth"}]
Grip/Marten auth patterns
GENERIC_HANDLER_PATTERNS = [{/context\.session/, "Crystal session check"}]
HANDLER_AUTH_PATTERNS = (((KEMAL_FILTER_PATTERNS + KEMAL_HANDLER_PATTERNS) + LUCKY_AUTH_PATTERNS) + GENERIC_FILTER_PATTERNS) + GENERIC_HANDLER_PATTERNS
Read inside the route's own block.
KEMAL_FILTER_PATTERNS = [{/before_all.*do.*auth/i, "Kemal before_all auth filter"}, {/basic_auth/, "Kemal basic_auth"}]
Kemal file-level filters: they guard every route below them.
KEMAL_HANDLER_PATTERNS = [{/env\.session\.string\s*\(\s*"user/, "Kemal session user check"}, {/env\.get\s*\(\s*"auth/, "Kemal auth context"}]
Kemal checks that guard only the handler making them.
LUCKY_ALLOW_GUESTS = /include\s+Auth::AllowGuests\b/
Lucky's opt-out of the sign-in BrowserAction requires: the action is
public, so nothing above it in the class may tag it.
LUCKY_AUTH_PATTERNS = [{/include Auth::RequireSignIn/, "Lucky Auth::RequireSignIn"}, {/before require_sign_in/, "Lucky require_sign_in before action"}]
Lucky auth patterns
Class methods
target_techs
Source