class DeviseCasAuthenticatable::SingleSignOut::WardenFailureApp
Redirect to the logout url when :warden is thrown, so that a single_sign_out request can be initiated
Public Instance Methods
redirect()
click to toggle source
# File lib/devise_cas_authenticatable/single_sign_out/warden_failure_app.rb, line 14 def redirect store_location! if flash[:timedout] && flash[:alert] flash.keep(:timedout) flash.keep(:alert) else flash[:alert] = i18n_message end redirect_to redirect_url end
respond()
click to toggle source
You need to override respond to eliminate recall
# File lib/devise_cas_authenticatable/single_sign_out/warden_failure_app.rb, line 6 def respond if http_auth? http_auth else redirect end end
Protected Instance Methods
redirect_url()
click to toggle source
Calls superclass method
# File lib/devise_cas_authenticatable/single_sign_out/warden_failure_app.rb, line 27 def redirect_url if [:timeout, :inactive].include? warden_message flash[:timedout] = true if warden_message == :timeout Devise.cas_client.logout_url else if respond_to?(:scope_path) scope_path else super end end end