Class: DeviseCasAuthenticatable::SingleSignOut::WardenFailureApp

Inherits:
Devise::FailureApp
  • Object
show all
Defined in:
lib/devise_cas_authenticatable/single_sign_out/warden_failure_app.rb

Overview

Redirect to the logout url when :warden is thrown, so that a single_sign_out request can be initiated

Instance Method Summary collapse

Instance Method Details

#redirectObject



14
15
16
17
18
19
20
21
22
23
# 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

#respondObject

You need to override respond to eliminate recall



6
7
8
9
10
11
12
# 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