Sha256: 37bea9a694acf13b82f73c79ab0b1193eccbb9b16569813d6d812f02d18c452f

Contents?: true

Size: 638 Bytes

Versions: 24

Compression:

Stored size: 638 Bytes

Contents

# frozen_string_literal: true

module Devise
  module Strategies
    # Base strategy for Devise. Responsible for verifying correct scope and mapping.
    class Base < ::Warden::Strategies::Base
      # Whenever CSRF cannot be verified, we turn off any kind of storage
      def store?
        !env["devise.skip_storage"]
      end

      # Checks if a valid scope was given for devise and find mapping based on this scope.
      def mapping
        @mapping ||= begin
          mapping = Devise.mappings[scope]
          raise "Could not find mapping for #{scope}" unless mapping
          mapping
        end
      end
    end
  end
end

Version data entries

24 entries across 23 versions & 4 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/devise-4.9.4/lib/devise/strategies/base.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/devise-4.9.4/lib/devise/strategies/base.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/devise-4.9.4/lib/devise/strategies/base.rb
devise-4.9.4 lib/devise/strategies/base.rb
devise-4.9.3 lib/devise/strategies/base.rb
devise-4.9.2 lib/devise/strategies/base.rb
devise-4.9.1 lib/devise/strategies/base.rb
devise-4.9.0 lib/devise/strategies/base.rb
devise-4.8.1 lib/devise/strategies/base.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/devise-4.8.0/lib/devise/strategies/base.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/devise-4.8.0/lib/devise/strategies/base.rb
devise-4.8.0 lib/devise/strategies/base.rb
devise-4.7.3 lib/devise/strategies/base.rb
devise-4.7.2 lib/devise/strategies/base.rb
devise-4.7.1 lib/devise/strategies/base.rb
devise-4.7.0 lib/devise/strategies/base.rb
devise-4.6.2 lib/devise/strategies/base.rb
devise-4.6.1 lib/devise/strategies/base.rb
devise-4.6.0 lib/devise/strategies/base.rb
devise-4.5.0 lib/devise/strategies/base.rb