Class: CASClient::SessionsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- CASClient::SessionsController
- Defined in:
- app/controllers/cas_client/sessions_controller.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#cas_logout ⇒ Object
32 33 34 35 36 37 38 |
# File 'app/controllers/cas_client/sessions_controller.rb', line 32 def cas_logout if CASClient::Configuration.mock_cas redirect_to login_path else render :nothing => true end end |
#create ⇒ Object
18 19 20 |
# File 'app/controllers/cas_client/sessions_controller.rb', line 18 def create raise "Not Implemented" end |
#destroy ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'app/controllers/cas_client/sessions_controller.rb', line 22 def destroy if CASClient::Configuration.mock_cas cas_logout else redirect_url = ::CAS_SERVER["cas_domain"] + '/logout' redirect_url << "?url=#{params[:url]}" if params[:url] redirect_to redirect_url end end |
#new ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/controllers/cas_client/sessions_controller.rb', line 4 def new if CASClient::Configuration.mock_cas if request.post? request.env['omniauth.auth'] = {} request.env['omniauth.auth']['uid'] = params[:uuid] create else render :new end else redirect_to '/auth/cas' end end |