Module: Sso::Warden::Support
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary
collapse
Methods included from Logging
#debug, #error, #fatal, #info, #warn
Instance Method Details
#initialize(user, warden, options) ⇒ Object
21
22
23
|
# File 'lib/sso/warden/support.rb', line 21
def initialize(user, warden, options)
@user, @warden, @options = user, warden, options
end
|
#logged_in? ⇒ Boolean
33
34
35
|
# File 'lib/sso/warden/support.rb', line 33
def logged_in?
warden.authenticated?(scope) && session && user
end
|
#scope ⇒ Object
25
26
27
|
# File 'lib/sso/warden/support.rb', line 25
def scope
scope = options[:scope]
end
|
#session ⇒ Object
29
30
31
|
# File 'lib/sso/warden/support.rb', line 29
def session
warden.session(scope)
end
|