Sha256: 816c21e2afd37f575f6ee28abd165a93abf9f57c48312fbbbbf2aeb4e8cdad08
Contents?: true
Size: 1.19 KB
Versions: 41
Compression:
Stored size: 1.19 KB
Contents
# frozen_string_literal: true require 'devise' require 'devise-encryptable' module Ibrain module Auth class Engine < Rails::Engine isolate_namespace Ibrain::Auth engine_name 'ibrain_auth' config.generators.api_only = true initializer 'ibrain.auth.environment', before: :load_config_initializers do |_app| require 'ibrain/auth_configuration' Ibrain::Auth::Config = Ibrain::AuthConfiguration.new end config.to_prepare do ApplicationController.include Ibrain::AuthenticationHelpers end def self.fallback_on_unauthorized? return false unless Ibrain::Config.respond_to?(:fallback_on_unauthorized) if Ibrain::Config.fallback_on_unauthorized true else Ibrain::Deprecation.warn <<-WARN.strip_heredoc, caller Having Ibrain::Config.fallback_on_unauthorized set to `false` is deprecated and will not be supported. Please change this configuration to `true` and be sure that your application does not break trying to redirect back when there is an unauthorized access. WARN false end end end end end
Version data entries
41 entries across 41 versions & 2 rubygems