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
Instance Attribute Summary
Attributes inherited from AbstractAdapter
Instance Method Summary collapse
- #authenticate_with_http_basic(&block) ⇒ Object
- #cookie_domain ⇒ Object
- #cookies ⇒ Object
- #request_content_type ⇒ Object
Methods inherited from AbstractAdapter
#initialize, #params, #request, #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
6 7 8 |
# File 'lib/authlogic/controller_adapters/rails_adapter.rb', line 6 def authenticate_with_http_basic(&block) controller.authenticate_with_http_basic(&block) end |
#cookie_domain ⇒ Object
14 15 16 17 |
# File 'lib/authlogic/controller_adapters/rails_adapter.rb', line 14 def @cookie_domain_key ||= (Rails::VERSION::MAJOR >= 2 && Rails::VERSION::MINOR >= 3) ? :domain : :session_domain ActionController::Base.[@cookie_domain_key] end |
#cookies ⇒ Object
10 11 12 |
# File 'lib/authlogic/controller_adapters/rails_adapter.rb', line 10 def controller.send(:cookies) end |
#request_content_type ⇒ Object
19 20 21 |
# File 'lib/authlogic/controller_adapters/rails_adapter.rb', line 19 def request_content_type request.format.to_s end |