module Lockie::ControllerHelper
Public Instance Methods
authenticate(scope = warden.config.default_scope)
click to toggle source
# File lib/lockie/controller_helper.rb, line 26 def authenticate(scope = warden.config.default_scope) warden.authenticate({ scope: scope }.compact) end
authenticate!(scope = warden.config.default_scope)
click to toggle source
# File lib/lockie/controller_helper.rb, line 22 def authenticate!(scope = warden.config.default_scope) warden.authenticate!({ scope: scope }.compact) end
authenticated?(*args)
click to toggle source
# File lib/lockie/controller_helper.rb, line 30 def authenticated?(*args) warden.authenticated?(*args) end
Also aliased as: logged_in?
logout(*args)
click to toggle source
# File lib/lockie/controller_helper.rb, line 36 def logout(*args) authenticated?(args) warden.logout end
warden()
click to toggle source
# File lib/lockie/controller_helper.rb, line 13 def warden return request.env['warden'] if defined?(request) env['warden'] end