Module: Lockdown::Frameworks::Rails::Controller::Lock
- Defined in:
- lib/lockdown/frameworks/rails/controller.rb
Overview
Locking methods
Instance Method Summary collapse
- #check_request_authorization ⇒ Object
- #configure_lockdown ⇒ Object
-
#set_current_user ⇒ Object
Basic auth functionality needs to be reworked as Lockdown doesn’t provide authentication functionality.
Instance Method Details
#check_request_authorization ⇒ Object
32 33 34 35 36 |
# File 'lib/lockdown/frameworks/rails/controller.rb', line 32 def unless (path_from_hash(params)) raise SecurityError, "Authorization failed! \nparams: #{params.inspect}\nsession: #{session.inspect}" end end |
#configure_lockdown ⇒ Object
17 18 19 20 |
# File 'lib/lockdown/frameworks/rails/controller.rb', line 17 def configure_lockdown check_session_expiry store_location end |
#set_current_user ⇒ Object
Basic auth functionality needs to be reworked as Lockdown doesn’t provide authentication functionality.
24 25 26 27 28 29 30 |
# File 'lib/lockdown/frameworks/rails/controller.rb', line 24 def set_current_user #login_from_basic_auth? unless logged_in? if logged_in? Thread.current[:who_did_it] = Lockdown::System. call(self, :who_did_it) end end |