Sha256: 7ce885349332f7476ea9e638828e935a64336bcfa287dfa60155d4b2aa03390e

Contents?: true

Size: 444 Bytes

Versions: 2

Compression:

Stored size: 444 Bytes

Contents

module AuthN
  def self.config
    @config ||= Config.new Config.defaults
  end

  class Config < AltStruct
    @@defaults = {
      password_digest_method: :password_digest,
      account_klass: "Account",
      login_password_key: :password,
      model_id_method: :id,
      model_critera_method: :where,
      session_key_function: ->(klass) { :"session_#{klass}_id" }
    }

    def self.defaults
      @@defaults ||= {}
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
authn-3.1.0 lib/authn/config.rb
authn-2.6.0 lib/authn/config.rb