Class: Authlogic::Cas::SingleSignOut::Cache

Inherits:
Object
  • Object
show all
Defined in:
lib/authlogic_cas/single_sign_out/cache.rb

Class Method Summary collapse

Class Method Details

.delete_service_ticket(service_ticket_name) ⇒ Object



12
13
14
15
# File 'lib/authlogic_cas/single_sign_out/cache.rb', line 12

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

.find_unique_cas_id_by_service_ticket(service_ticket_name) ⇒ Object



17
18
19
20
21
# File 'lib/authlogic_cas/single_sign_out/cache.rb', line 17

def find_unique_cas_id_by_service_ticket(service_ticket_name)
  unique_cas_id = Rails.cache.read(cache_key(service_ticket_name))
  logger.debug("Found session id #{unique_cas_id.inspect} for index #{service_ticket_name.inspect}")
  unique_cas_id
end

.loggerObject



8
9
10
# File 'lib/authlogic_cas/single_sign_out/cache.rb', line 8

def logger
  @logger ||= Rails.logger
end

.store_unique_cas_id_for_service_ticket(service_ticket_name, unique_cas_id) ⇒ Object



23
24
25
# File 'lib/authlogic_cas/single_sign_out/cache.rb', line 23

def store_unique_cas_id_for_service_ticket(service_ticket_name, unique_cas_id)
  Rails.cache.write(cache_key(service_ticket_name), unique_cas_id)
end