Module: Sso::Warden::Support

Extended by:
ActiveSupport::Concern
Includes:
Logging
Included in:
Pingback, Hooks::BeforeLogout, Hooks::CreateMasterSession, Hooks::SessionCheck
Defined in:
lib/sso/warden/support.rb

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

Returns:

  • (Boolean)


33
34
35
# File 'lib/sso/warden/support.rb', line 33

def logged_in?
  warden.authenticated?(scope) && session && user
end

#scopeObject



25
26
27
# File 'lib/sso/warden/support.rb', line 25

def scope
  scope = options[:scope]
end

#sessionObject



29
30
31
# File 'lib/sso/warden/support.rb', line 29

def session
  warden.session(scope)
end