Class: Authgasm::ControllerAdapters::RailsAdapter

Inherits:
AbstractAdapter show all
Defined in:
lib/authgasm/controller_adapters/rails_adapter.rb

Overview

Rails Adapter

Adapts authgasm to work with rails. The point is to close the gap between what authgasm expects and what the rails controller object provides. Similar to how ActiveRecord has an adapter for MySQL, PostgreSQL, SQLite, etc.

Instance Attribute Summary

Attributes inherited from AbstractAdapter

#controller

Instance Method Summary collapse

Methods inherited from AbstractAdapter

#initialize

Constructor Details

This class inherits a constructor from Authgasm::ControllerAdapters::AbstractAdapter

Instance Method Details

#authenticate_with_http_basic(*args, &block) ⇒ Object



7
8
9
# File 'lib/authgasm/controller_adapters/rails_adapter.rb', line 7

def authenticate_with_http_basic(*args, &block)
  controller.authenticate_with_http_basic(*args, &block)
end

#cookiesObject



11
12
13
# File 'lib/authgasm/controller_adapters/rails_adapter.rb', line 11

def cookies
  controller.send(:cookies)
end

#requestObject



15
16
17
# File 'lib/authgasm/controller_adapters/rails_adapter.rb', line 15

def request
  controller.request
end

#sessionObject



19
20
21
# File 'lib/authgasm/controller_adapters/rails_adapter.rb', line 19

def session
  controller.session
end