Class: Devise::CasSessionsController
- Inherits:
-
SessionsController
- Object
- SessionsController
- Devise::CasSessionsController
- Defined in:
- app/controllers/devise/cas_sessions_controller.rb
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/controllers/devise/cas_sessions_controller.rb', line 14 def destroy # if :cas_create_user is false a CAS session might be open but not signed_in # in such case we destroy the session here if signed_in?(resource_name) sign_out(resource_name) session.delete('cas') else reset_session end redirect_to(cas_logout_url, allow_other_host: true) end |
#new ⇒ Object
2 3 4 5 6 |
# File 'app/controllers/devise/cas_sessions_controller.rb', line 2 def new # TODO: Figure out if there's a less hacky way to do this RackCAS.config.service = cas_service_url head 401 end |
#service ⇒ Object
8 9 10 |
# File 'app/controllers/devise/cas_sessions_controller.rb', line 8 def service redirect_to after_sign_in_path_for(warden.authenticate!(:scope => resource_name)), allow_other_host: true end |
#unregistered ⇒ Object
12 |
# File 'app/controllers/devise/cas_sessions_controller.rb', line 12 def unregistered; end |