Module: RailsWarden::Mixins::ControllerOnlyMethods
- Defined in:
- lib/rails_warden/controller_mixin.rb
Overview
Helper Methods
Instance Method Summary collapse
-
#authenticate(*args) ⇒ Object
Proxy to the authenticate method on warden :api: public.
-
#authenticate!(*args) ⇒ Object
Proxy to the authenticate method on warden :api: public.
-
#logout(*args) ⇒ Object
Logout the current user :api: public.
Instance Method Details
#authenticate(*args) ⇒ Object
Proxy to the authenticate method on warden :api: public
41 42 43 |
# File 'lib/rails_warden/controller_mixin.rb', line 41 def authenticate(*args) warden.authenticate(*args) end |
#authenticate!(*args) ⇒ Object
Proxy to the authenticate method on warden :api: public
47 48 49 50 51 52 53 54 55 |
# File 'lib/rails_warden/controller_mixin.rb', line 47 def authenticate!(*args) defaults = {:action => RailsWarden.unauthenticated_action} if args.last.is_a? Hash args[-1] = defaults.merge(args.last) else args << defaults end warden.authenticate!(*args) end |
#logout(*args) ⇒ Object
Logout the current user :api: public
34 35 36 37 |
# File 'lib/rails_warden/controller_mixin.rb', line 34 def logout(*args) warden.raw_session.inspect # Without this inspect here. The session does not clear :| warden.logout(*args) end |