Class: DoorkeeperHub::OmniauthCallbacksController

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

Instance Method Summary collapse

Instance Method Details

#samlObject



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

def saml
  @user = DoorkeeperHub
            .user_model
            .from_omniauth(request.env["omniauth.auth"])

  if @user.present? && @user.persisted?
     @user, event: :authentication
  else
    raise ActionController::RoutingError.new('Not Found')
  end
end