module Authpwn::ControllerBaseExtensions::ClassMethods

Class methds on classes that include Authpwn::ControllerBaseExtensions

Public Instance Methods

authenticates_using_session(options = {}) click to toggle source

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.

# File lib/authpwn_rails/session.rb, line 29
def authenticates_using_session(options = {})
  include Authpwn::ControllerInstanceMethods
  before_action :authenticate_using_session, options
end