Class: Intra::SessionsController

Inherits:
ActionController::Base
  • Object
show all
Includes:
Authentication
Defined in:
app/controllers/intra/sessions_controller.rb

Instance Method Summary collapse

Methods included from Authentication

#authenticate!, #current_user, #handle_unverified_request, included, #intra_session, #sign_in, #sign_out, #signed_in?, #signed_out?

Instance Method Details

#createObject

GET /auth/:provider/callback



14
15
16
17
# File 'app/controllers/intra/sessions_controller.rb', line 14

def create
   request.env['omniauth.auth']
  redirect_to main_app.root_path
end

#destroyObject

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.
end

#failureObject



25
26
27
# File 'app/controllers/intra/sessions_controller.rb', line 25

def failure
  redirect_to Intra., error: request.params['message']
end

#newObject

GET /sign_in



10
11
# File 'app/controllers/intra/sessions_controller.rb', line 10

def new
end