Class: KeycloakOauth::CallbacksController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/keycloak_oauth/callbacks_controller.rb

Instance Method Summary collapse

Instance Method Details

#oauth2Object



7
8
9
10
11
12
13
14
15
16
# File 'app/controllers/keycloak_oauth/callbacks_controller.rb', line 7

def oauth2
  authentication_service = KeycloakOauth::AuthenticationService.new(
    authentication_params: authentication_params,
    session: session
  )
  authentication_service.authenticate
  map_authenticatable_if_implemented(session)

  redirect_to self.class.method_defined?(:after_sign_in_path) ? (request) : main_app.root_path
end