Class: DeviseCasAuthenticatable::SingleSignOut::Strategies::RedisCache
- Inherits:
-
Base
- Object
- Base
- DeviseCasAuthenticatable::SingleSignOut::Strategies::RedisCache
show all
- Includes:
- DestroySession, WithConn
- Defined in:
- lib/devise_cas_authenticatable/single_sign_out/strategies/redis_cache.rb
Instance Method Summary
collapse
Methods included from WithConn
#with_conn
#current_session_store, #destroy_session_by_id, #session_store_class, #session_store_identifier
Methods inherited from Base
#logger
Instance Method Details
#delete_session_index(session_index) ⇒ Object
24
25
26
27
|
# File 'lib/devise_cas_authenticatable/single_sign_out/strategies/redis_cache.rb', line 24
def delete_session_index(session_index)
logger.debug("Deleting index #{session_index}")
destroy_session_by_id(session_index)
end
|
#find_session_id_by_index(session_index) ⇒ Object
19
20
21
22
23
|
# File 'lib/devise_cas_authenticatable/single_sign_out/strategies/redis_cache.rb', line 19
def find_session_id_by_index(session_index)
sid = with_conn { |conn| conn.get(cache_key(session_index)) }
logger.debug("Found session id #{sid} for index #{session_index}") if sid
sid
end
|
#store_session_id_for_index(session_index, session_id) ⇒ Object
10
11
12
13
14
15
16
17
18
|
# File 'lib/devise_cas_authenticatable/single_sign_out/strategies/redis_cache.rb', line 10
def store_session_id_for_index(session_index, session_id)
logger.debug("Storing #{session_id} for index #{session_index}")
with_conn do |conn|
conn.set(
cache_key(session_index),
session_id
)
end
end
|