class Kingsman::Strategies::Base

Base strategy for Kingsman. Responsible for verifying correct scope and mapping.

def mapping

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

def store?

Whenever CSRF cannot be verified, we turn off any kind of storage
def store?
  !env["kingsman.skip_storage"]
end