Class: Users::OmniauthCallbacksController

Inherits:
Devise::OmniauthCallbacksController
  • Object
show all
Defined in:
app/controllers/users/omniauth_callbacks_controller.rb

Instance Method Summary collapse

Instance Method Details

#casObject



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
     @user, event: :authentication # this will throw if @user is not activated
    if is_navigational_format?
      set_flash_message(:notice, :success, kind: "from Princeton Central Authentication Service")
    end
  end
end