Class: InfinumAzure::Resources::OmniauthCallbacksController
- Inherits:
-
Devise::OmniauthCallbacksController
- Object
- Devise::OmniauthCallbacksController
- InfinumAzure::Resources::OmniauthCallbacksController
- Defined in:
- app/controllers/infinum_azure/resources/omniauth_callbacks_controller.rb
Instance Method Summary collapse
Instance Method Details
#failure ⇒ Object
18 19 20 21 22 |
# File 'app/controllers/infinum_azure/resources/omniauth_callbacks_controller.rb', line 18 def failure :alert, :failure, kind: OmniAuth::Utils.camelize(failed_strategy.name), reason: redirect_to root_path end |
#infinum_azure ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/controllers/infinum_azure/resources/omniauth_callbacks_controller.rb', line 6 def infinum_azure resource = InfinumAzure::Resources::Finder.from_omniauth(omniauth) if resource flash[:notice] = I18n.t 'devise.omniauth_callbacks.success', kind: 'Azure' sign_in_and_redirect resource, event: :authentication else flash[:notice] = 'You do not have permission to access this application.' # rubocop:disable Rails/I18nLocaleTexts redirect_to root_path end end |