Class: Intra::SessionsController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Intra::SessionsController
- Includes:
- Authentication
- Defined in:
- app/controllers/intra/sessions_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
GET /auth/:provider/callback.
-
#destroy ⇒ Object
GET /sign_out.
- #failure ⇒ Object
-
#new ⇒ Object
GET /sign_in.
Methods included from Authentication
#authenticate!, #current_user, #handle_unverified_request, included, #intra_session, #sign_in, #sign_out, #signed_in?, #signed_out?
Instance Method Details
#create ⇒ Object
GET /auth/:provider/callback
14 15 16 17 |
# File 'app/controllers/intra/sessions_controller.rb', line 14 def create sign_in request.env['omniauth.auth'] redirect_to main_app.root_path end |
#destroy ⇒ Object
GET /sign_out
20 21 22 23 |
# File 'app/controllers/intra/sessions_controller.rb', line 20 def destroy sign_out if signed_in? redirect_to Intra.sign_in_path end |
#failure ⇒ Object
25 26 27 |
# File 'app/controllers/intra/sessions_controller.rb', line 25 def failure redirect_to Intra.sign_in_path, error: request.params['message'] end |
#new ⇒ Object
GET /sign_in
10 11 |
# File 'app/controllers/intra/sessions_controller.rb', line 10 def new end |