Class: DeviseCasAuthenticatable::SingleSignOut::Strategies::RailsCache

Inherits:
Base
  • Object
show all
Defined in:
lib/devise_cas_authenticatable/single_sign_out/strategies/rails_cache.rb

Instance Method Summary collapse

Methods inherited from Base

#logger

Instance Method Details

#delete_session_index(session_index) ⇒ Object



16
17
18
19
# File 'lib/devise_cas_authenticatable/single_sign_out/strategies/rails_cache.rb', line 16

def delete_session_index(session_index)
  logger.info("Deleting index #{session_index}")
  Rails.cache.delete(cache_key(session_index))
end

#find_session_id_by_index(session_index) ⇒ Object



10
11
12
13
14
# File 'lib/devise_cas_authenticatable/single_sign_out/strategies/rails_cache.rb', line 10

def find_session_id_by_index(session_index)
  sid = Rails.cache.read(cache_key(session_index))
  logger.debug("Found session id #{sid.inspect} for index #{session_index.inspect}")
  sid
end

#store_session_id_for_index(session_index, session_id) ⇒ Object



5
6
7
8
# File 'lib/devise_cas_authenticatable/single_sign_out/strategies/rails_cache.rb', line 5

def store_session_id_for_index(session_index, session_id)
  logger.debug("Storing #{session_id} for index #{session_index}")
  Rails.cache.write(cache_key(session_index), session_id)
end