Module: OpenSesame::Helpers::ControllerHelper

Extended by:
ActiveSupport::Concern
Defined in:
lib/open_sesame/helpers/controller_helper.rb

Instance Method Summary collapse

Instance Method Details

#authenticate_opensesame!Object



10
11
12
# File 'lib/open_sesame/helpers/controller_helper.rb', line 10

def authenticate_opensesame!
  warden.authenticate!(:scope => :opensesame)
end

#current_opensesame_userObject



14
15
16
# File 'lib/open_sesame/helpers/controller_helper.rb', line 14

def current_opensesame_user
  warden.user(:scope => :opensesame)
end

#wardenObject



6
7
8
# File 'lib/open_sesame/helpers/controller_helper.rb', line 6

def warden
  env['warden']
end