Class: Machina::CallbacksController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Machina::CallbacksController
- Defined in:
- app/controllers/machina/callbacks_controller.rb
Overview
Completes the Console auth handshake. Console redirects here with the
minted session token; the state nonce issued by authenticate! must be
echoed back or the token is rejected (login-CSRF / session fixation).
The engine has no ApplicationController; Base is required for cookies.
Instance Method Summary collapse
-
#show ⇒ Object
rubocop:disable Rails/ApplicationController.
Instance Method Details
#show ⇒ Object
rubocop:disable Rails/ApplicationController
9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/machina/callbacks_controller.rb', line 9 def show return reject('missing token') if params[:token].blank? return reject('state mismatch') unless valid_state? .delete(:machina_state) reset_session redirect_to safe_return_to end |