Module: DeviseCasAuthenticatable::SingleSignOut::SetSession

Included in:
RedisSessionStore
Defined in:
lib/devise_cas_authenticatable/single_sign_out.rb

Instance Method Summary collapse

Instance Method Details

#set_session_with_storage(env, sid, session_data, options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/devise_cas_authenticatable/single_sign_out.rb', line 4

def set_session_with_storage(env, sid, session_data, options={})
  if session_data['cas_last_valid_ticket_store']
    ::DeviseCasAuthenticatable::SingleSignOut::Strategies.current_strategy.store_session_id_for_index(session_data['cas_last_valid_ticket'], sid)
    session_data['cas_last_valid_ticket_store'] = nil
  end

  if method(:set_session_without_storage).arity == 4
    set_session_without_storage(env, sid, session_data, options)
  else
    set_session_without_storage(env, sid, session_data)
  end
end