class ElixirAuthTagger

Defined in:

tagger/framework_taggers/elixir/elixir_auth.cr

Constant 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

Instance methods inherited from class FrameworkTagger

read_file(path : String) : String | Nil read_file, read_source_context(endpoint : Endpoint) : Array(SourceContext) read_source_context

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_extension(extension : String) : Array(String) get_files_by_extension, 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_public_dir_files(base_path : String, folder : String) : Array(String) get_public_dir_files, get_public_files(base_path : String) : Array(String) get_public_files, populate_channel_with_files(channel : Channel(String)) populate_channel_with_files, populate_channel_with_filtered_files(channel : Channel(String), extension : String)
populate_channel_with_filtered_files(channel : Channel(String), extensions : Array(String))
populate_channel_with_filtered_files

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

Constructor Detail

def self.new(options : Hash(String, YAML::Any)) #

[View source]

Class Method Detail

def self.target_techs : Array(String) #

[View source]

Instance Method Detail

def perform(endpoints : Array(Endpoint)) : Array(Endpoint) #

[View source]