class Sso::Warden::Hooks::SessionCheck

Public Instance Methods

call() click to toggle source
# File lib/sso/warden/hooks/session_check.rb, line 7
def call
  debug { "Starting hook after user is fetched into the session" }

  unless logged_in? && Sso::Session.find_by_id(session["sso_session_id"]).try(:active?)
    warden.logout(scope)
    throw(:warden, :scope => scope, :reason => "Sso::Session INACTIVE")
  end
end