Sha256: 1619bc0891e65f8d5f6c6448bbb3a876e41771942bd00ae0966100adf8c14144

Contents?: true

Size: 673 Bytes

Versions: 34

Compression:

Stored size: 673 Bytes

Contents

module Warden::Mixins::Common
  def request
    @request ||= ActionDispatch::Request.new(env)
  end

  # Deprecate: Remove this check once we move to Rails 4 only.
  NULL_STORE =
    defined?(ActionController::RequestForgeryProtection::ProtectionMethods::NullSession::NullSessionHash) ?
      ActionController::RequestForgeryProtection::ProtectionMethods::NullSession::NullSessionHash : nil

  def reset_session!
    # Calling reset_session on NULL_STORE causes it fail.
    # This is a bug that needs to be fixed in Rails.
    unless NULL_STORE && request.session.is_a?(NULL_STORE)
      request.reset_session
    end
  end

  def cookies
    request.cookie_jar
  end
end

Version data entries

34 entries across 34 versions & 6 rubygems

Version Path
devise-3.5.10 lib/devise/rails/warden_compat.rb
devise-3.5.9 lib/devise/rails/warden_compat.rb
devise-3.5.8 lib/devise/rails/warden_compat.rb
devise-3.5.7 lib/devise/rails/warden_compat.rb
devise-3.5.6 lib/devise/rails/warden_compat.rb
devise-3.5.5 lib/devise/rails/warden_compat.rb
devise-3.5.4 lib/devise/rails/warden_compat.rb
devise-3.5.3 lib/devise/rails/warden_compat.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/devise-3.5.2/lib/devise/rails/warden_compat.rb
devise-3.5.2 lib/devise/rails/warden_compat.rb
devise-3.5.1 lib/devise/rails/warden_compat.rb
deviseOne-1.0.0 lib/devise/rails/warden_compat.rb
devise-3.4.1 lib/devise/rails/warden_compat.rb
devise-3.4.0 lib/devise/rails/warden_compat.rb
brainsome_devise-3.3.0 lib/devise/rails/warden_compat.rb
devise-3.3.0 lib/devise/rails/warden_compat.rb
devbootsrap-0.0.7 lib/devise/rails/warden_compat.rb
devbootsrap-0.0.6 lib/devise/rails/warden_compat.rb
devbootsrap-0.0.5 lib/devise/rails/warden_compat.rb
devbootsrap-0.0.4 lib/devise/rails/warden_compat.rb