Class: Users::OmniauthCallbacksController
- Inherits:
-
Devise::OmniauthCallbacksController
- Object
- Devise::OmniauthCallbacksController
- Users::OmniauthCallbacksController
- Defined in:
- app/controllers/users/omniauth_callbacks_controller.rb
Instance Method Summary collapse
Instance Method Details
#cas ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/users/omniauth_callbacks_controller.rb', line 4 def cas @user = User.from_cas(request.env["omniauth.auth"]) if @user.nil? redirect_to root_path flash[:notice] = "You are not authorized" else sign_in_and_redirect @user, event: :authentication # this will throw if @user is not activated if (:notice, :success, kind: "from Princeton Central Authentication Service") end end end |