Module: Devise

Defined in:
lib/devise_session_expirable/model.rb,
lib/devise_session_expirable/devise_extensions.rb

Overview

:nodoc:

Defined Under Namespace

Modules: Models Classes: Mapping

Class Method Summary collapse

Class Method Details

.configure_warden!Object

:nodoc:



10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/devise_session_expirable/devise_extensions.rb', line 10

def self.configure_warden! #:nodoc:
  warden_config.failure_app   = DeviseSessionExpirable::Delegator.new
  warden_config.default_scope = Devise.default_scope
  warden_config.intercept_401 = false

  Devise.mappings.each_value do |mapping|
    warden_config.scope_defaults mapping.name, :strategies => mapping.strategies
  end

  @@warden_config_block.try :call, Devise.warden_config
  true
end