Class: OAuth::Controllers::ApplicationControllerMethods::Filter
- Inherits:
-
Object
- Object
- OAuth::Controllers::ApplicationControllerMethods::Filter
- Defined in:
- lib/oauth/controllers/application_controller_methods.rb
Instance Method Summary collapse
- #before(controller) ⇒ Object
-
#initialize(options = {}) ⇒ Filter
constructor
A new instance of Filter.
Constructor Details
#initialize(options = {}) ⇒ Filter
Returns a new instance of Filter.
22 23 24 25 26 27 28 29 |
# File 'lib/oauth/controllers/application_controller_methods.rb', line 22 def initialize(={}) @options={ :interactive=>true, :strategies => [:token,:two_legged] }.merge() @strategies = Array(@options[:strategies]) @strategies << :interactive if @options[:interactive] end |
Instance Method Details
#before(controller) ⇒ Object
31 32 33 |
# File 'lib/oauth/controllers/application_controller_methods.rb', line 31 def before(controller) Authenticator.new(controller,@strategies).allow? end |