Class: Authlogic::ControllerAdapters::RailsAdapter
- Inherits:
-
AbstractAdapter
- Object
- AbstractAdapter
- Authlogic::ControllerAdapters::RailsAdapter
- Defined in:
- lib/authlogic/controller_adapters/rails_adapter.rb
Overview
Adapts authlogic to work with rails. The point is to close the gap between what authlogic expects and what the rails controller object provides. Similar to how ActiveRecord has an adapter for MySQL, PostgreSQL, SQLite, etc.
Defined Under Namespace
Modules: RailsImplementation Classes: AuthlogicLoadedTooLateError
Constant Summary
Constants inherited from AbstractAdapter
AbstractAdapter::E_COOKIE_DOMAIN_ADAPTER
Instance Attribute Summary
Attributes inherited from AbstractAdapter
Instance Method Summary collapse
- #authenticate_with_http_basic(&block) ⇒ Object
- #cookie_domain ⇒ Object
-
#cookies ⇒ Object
Returns a ‘ActionDispatch::Cookies::CookieJar`.
- #request_content_type ⇒ Object
Methods inherited from AbstractAdapter
#initialize, #last_request_update_allowed?, #params, #request, #respond_to_missing?, #responds_to_single_access_allowed?, #session, #single_access_allowed?
Constructor Details
This class inherits a constructor from Authlogic::ControllerAdapters::AbstractAdapter
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Authlogic::ControllerAdapters::AbstractAdapter
Instance Method Details
#authenticate_with_http_basic(&block) ⇒ Object
26 27 28 |
# File 'lib/authlogic/controller_adapters/rails_adapter.rb', line 26 def authenticate_with_http_basic(&block) controller.authenticate_with_http_basic(&block) end |
#cookie_domain ⇒ Object
36 37 38 |
# File 'lib/authlogic/controller_adapters/rails_adapter.rb', line 36 def controller.request.[:domain] end |
#cookies ⇒ Object
Returns a ‘ActionDispatch::Cookies::CookieJar`. See the AC guide guides.rubyonrails.org/action_controller_overview.html#cookies
32 33 34 |
# File 'lib/authlogic/controller_adapters/rails_adapter.rb', line 32 def controller.send(:cookies) end |
#request_content_type ⇒ Object
40 41 42 |
# File 'lib/authlogic/controller_adapters/rails_adapter.rb', line 40 def request_content_type request.format.to_s end |