Class: Authlogic::ControllerAdapters::RailsAdapter
- Inherits:
-
AbstractAdapter
- Object
- AbstractAdapter
- Authlogic::ControllerAdapters::RailsAdapter
- Defined in:
- lib/authlogic/controller_adapters/rails_adapter.rb
Overview
Rails Adapter
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 collapse
-
#controller ⇒ Object
Returns the value of attribute controller.
Instance Method Summary collapse
- #authenticate_with_http_basic(&block) ⇒ Object
- #cookies ⇒ Object
-
#initialize(controller) ⇒ RailsAdapter
constructor
A new instance of RailsAdapter.
- #request ⇒ Object
- #session ⇒ Object
Constructor Details
#initialize(controller) ⇒ RailsAdapter
Returns a new instance of RailsAdapter.
9 10 11 |
# File 'lib/authlogic/controller_adapters/rails_adapter.rb', line 9 def initialize(controller) self.controller = controller end |
Instance Attribute Details
#controller ⇒ Object
Returns the value of attribute controller.
7 8 9 |
# File 'lib/authlogic/controller_adapters/rails_adapter.rb', line 7 def controller @controller end |
Instance Method Details
#authenticate_with_http_basic(&block) ⇒ Object
13 14 15 |
# File 'lib/authlogic/controller_adapters/rails_adapter.rb', line 13 def authenticate_with_http_basic(&block) controller.authenticate_with_http_basic(&block) end |
#cookies ⇒ Object
17 18 19 |
# File 'lib/authlogic/controller_adapters/rails_adapter.rb', line 17 def controller.send(:cookies) end |
#request ⇒ Object
21 22 23 |
# File 'lib/authlogic/controller_adapters/rails_adapter.rb', line 21 def request controller.request end |
#session ⇒ Object
25 26 27 |
# File 'lib/authlogic/controller_adapters/rails_adapter.rb', line 25 def session controller.session end |