class ElixirAuthTagger
- ElixirAuthTagger
- FrameworkTagger
- Tagger
- Reference
- Object
Defined in:
tagger/framework_taggers/elixir/elixir_auth.crConstant Summary
-
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 Method Summary
Instance Method Summary
-
#perform(endpoints : Array(Endpoint)) : Array(Endpoint)
The per-endpoint shape: look at each endpoint, tag in place, hand the array back.
Instance methods inherited from class FrameworkTagger
base_relative_path(path : String) : String
base_relative_path,
class_level_annotation(path : String, lines : Array(String), annotation_name : String) : String | Nil
class_level_annotation,
collect_files_by_extension(extension : String) : Array(String)
collect_files_by_extension,
perform(endpoints : Array(Endpoint)) : Array(Endpoint)
perform,
read_file(path : String) : String | Nil
read_file,
read_file_lines(path : String) : Array(String) | Nil
read_file_lines,
read_source_context(endpoint : Endpoint) : Array(SourceContext)
read_source_context,
static_asset_route?(url : String) : Bool
static_asset_route?
Constructor methods inherited from class FrameworkTagger
new(options : Hash(String, YAML::Any))
new
Class methods inherited from class FrameworkTagger
target_techs : Array(String)
target_techs
Instance methods inherited from module FileHelper
all_files : Array(String)
all_files,
get_files_by_basename(basename : String) : Array(String)
get_files_by_basename,
get_files_by_extension(extension : String) : Array(String)
get_files_by_extension,
get_files_by_extensions(extensions : Array(String)) : Array(String)
get_files_by_extensions,
get_files_by_prefix(prefix : String) : Array(String)
get_files_by_prefix,
get_files_by_prefix_and_extension(prefix : String, extension : String) : Array(String)
get_files_by_prefix_and_extension,
get_files_by_relative_path(relative_path : String, root : String = "") : Array(String)
get_files_by_relative_path,
get_public_dir_files(base_path : String, folder : String) : Array(String)
get_public_dir_files,
get_public_files(base_path : String, anchors : Array(String) = ["shard.yml", "Gemfile"]) : Array(String)
get_public_files,
walked_path(expanded : String) : String
walked_path
Instance methods inherited from class Tagger
name : String
name,
perform(endpoints : Array(Endpoint)) : Array(Endpoint)
perform
Constructor methods inherited from class Tagger
new(options : Hash(String, YAML::Any))
new
Class methods inherited from class Tagger
tagger_key : String
tagger_key
Constructor Detail
Class Method Detail
Instance Method Detail
Description copied from class FrameworkTagger
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.