Module: Authpwn::ControllerBaseExtensions::ClassMethods
- Defined in:
- lib/authpwn_rails/session.rb
Overview
Class methds on classes that include Authpwn::ControllerBaseExtensions
Instance Method Summary collapse
-
#authenticates_using_session(options = {}) ⇒ Object
Keeps track of the currently authenticated user via the session.
Instance Method Details
#authenticates_using_session(options = {}) ⇒ Object
Keeps track of the currently authenticated user via the session.
Assumes the existence of a User model. A bare ActiveModel model will do the trick. Model instances must implement id, and the model class must implement find_by_id.
29 30 31 32 |
# File 'lib/authpwn_rails/session.rb', line 29 def authenticates_using_session( = {}) include Authpwn::ControllerInstanceMethods before_action :authenticate_using_session, end |