Class: Devise::CasSessionsController
Instance Method Summary
collapse
#current_session_store, #destroy_session_by_id, #session_store_class, #session_store_identifier
#with_conn
Instance Method Details
#destroy ⇒ Object
26
27
28
29
30
31
32
33
34
35
36
|
# File 'app/controllers/devise/cas_sessions_controller.rb', line 26
def destroy
if signed_in?(resource_name)
sign_out(resource_name)
else
reset_session
end
redirect_to(cas_logout_url)
end
|
#new ⇒ Object
11
12
13
14
15
16
17
|
# File 'app/controllers/devise/cas_sessions_controller.rb', line 11
def new
if memcache_checker.session_store_memcache? && !memcache_checker.alive?
raise "memcache is down, can't get session data from it"
end
redirect_to(cas_login_url)
end
|
#service ⇒ Object
19
20
21
|
# File 'app/controllers/devise/cas_sessions_controller.rb', line 19
def service
redirect_to after_sign_in_path_for(warden.authenticate!(:scope => resource_name))
end
|
#single_sign_out ⇒ Object
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# File 'app/controllers/devise/cas_sessions_controller.rb', line 38
def single_sign_out
if ::Devise.cas_enable_single_sign_out
session_index = read_session_index
if session_index
logger.debug "Intercepted single-sign-out request for CAS session #{session_index}."
session_id = ::DeviseCasAuthenticatable::SingleSignOut::Strategies.current_strategy.find_session_id_by_index(session_index)
if session_id
logger.debug "Found Session ID #{session_id} with index key #{session_index}"
destroy_cas_session(session_index, session_id)
end
else
logger.warn "Ignoring CAS single-sign-out request as no session index could be parsed from the parameters."
end
else
logger.warn "Ignoring CAS single-sign-out request as feature is not currently enabled."
end
head :ok
end
|
#unregistered ⇒ Object
23
24
|
# File 'app/controllers/devise/cas_sessions_controller.rb', line 23
def unregistered
end
|