class RubyAuthTagger
- RubyAuthTagger
- FrameworkTagger
- Tagger
- Reference
- Object
Defined in:
tagger/framework_taggers/ruby/ruby_auth.crConstant Summary
-
ACTION_AUTH_PATTERNS =
[{/authorize\s+@?\w+/, "Pundit authorize"}, {/authorize!\s*/, "CanCanCan authorize!"}, {/load_and_authorize_resource/, "CanCanCan load_and_authorize_resource"}] -
Pundit / CanCanCan authorization in action body
-
BEFORE_ACTION_PATTERNS =
[{/before_action\s+:authenticate_user!/, "Devise authenticate_user!"}, {/before_action\s+:authenticate_/, "Devise authentication"}, {/before_action\s+:require_login/, "require_login"}, {/before_action\s+:require_authentication/, "require_authentication"}, {/before_action\s+:authorize/, "authorize"}, {/before_action\s+:check_auth/, "check_auth"}, {/before_action\s+:verify_authenticity_token/, "CSRF verify_authenticity_token"}, {/before_action\s+:doorkeeper_authorize!/, "Doorkeeper OAuth authorize"}, {/before_action\s+:authenticate_with_token/, "token authentication"}] -
Rails before_action patterns
-
GRAPE_AUTH_PATTERNS =
[{/before\s+do.*authenticate/, "Grape before authenticate"}, {/before\s*\{\s*authenticate!/, "Grape authenticate!"}, {/before\s*\{\s*require_auth/, "Grape require_auth"}, {/http_basic\s+do/, "Grape http_basic auth"}, {/helpers\s+do.*authenticate/, "Grape helpers authenticate"}, {/\.error!\s*\(\s*['"]Unauthorized/, "Grape error! unauthorized"}] -
Grape patterns (before blocks, http_basic, helpers)
-
HANAMI_AUTH_PATTERNS =
[{/before\s+:authenticate/, "Hanami authenticate"}, {/before\s+:authorize/, "Hanami authorize"}] -
Hanami patterns
-
RODA_AUTH_PATTERNS =
[{/rodauth\.require_authentication/, "Rodauth require_authentication"}, {/rodauth\.require_auth/, "Rodauth require_auth"}, {/rodauth\.logged_in\?/, "Rodauth logged_in?"}, {/rodauth\.authenticated\?/, "Rodauth authenticated?"}, {/r\.rodauth/, "Roda rodauth plugin"}, {/r\.halt\s+401/, "Roda 401 halt"}, {/authorize!/, "Roda authorize!"}] -
Roda / Rodauth patterns
-
SINATRA_AUTH_PATTERNS =
[{/before\s+do.*auth/, "Sinatra before filter auth"}, {/use\s+Rack::Auth/, "Rack::Auth middleware"}, {/use\s+Warden/, "Warden middleware"}, {/env\['warden'\]\.authenticate/, "Warden authenticate"}, {/protected!/, "protected! helper"}, {/halt\s+401/, "401 halt guard"}] -
Sinatra/Rack patterns
-
SKIP_PATTERNS =
[/skip_before_action\s+:authenticate/, /skip_before_action\s+:require_login/] -
skip_before_action marks public overrides