Module: Lockdown::Frameworks::Rails::Controller::Lock
- Defined in:
- lib/lockdown/frameworks/rails/controller.rb
Overview
Locking methods
Defined Under Namespace
Classes: LockdownSessionExpired
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
36 37 38 39 40 |
# File 'lib/lockdown/frameworks/rails/controller.rb', line 36 def unless (path_from_hash(params)) raise SecurityError, "Authorization failed! \nparams: #{params.inspect}\nsession: #{session.inspect}" end end |
#configure_lockdown ⇒ Object
20 21 22 23 24 |
# File 'lib/lockdown/frameworks/rails/controller.rb', line 20 def configure_lockdown Lockdown.maybe_parse_init check_session_expiry store_location end |
#set_current_user ⇒ Object
Basic auth functionality needs to be reworked as Lockdown doesn’t provide authentication functionality.
28 29 30 31 32 33 34 |
# File 'lib/lockdown/frameworks/rails/controller.rb', line 28 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 |