Sha256: a798c59079f58ee34ddb3c1e84c8f16c47d3be65b61f9fbf471cb696f2641160

Contents?: true

Size: 743 Bytes

Versions: 2

Compression:

Stored size: 743 Bytes

Contents

require 'gem_config'

require 'fridge/version'
require 'fridge/access_token'
require 'fridge/serialization_error'
require 'fridge/invalid_token'
require 'fridge/expired_token'

require 'fridge/railtie' if defined?(Rails)

module Fridge
  include GemConfig::Base

  with_configuration do
    has :private_key, classes: [String]
    has :public_key, classes: [String]

    has :signing_algorithm, values: %w(RS512 RS256), default: 'RS512'

    # A validator must raise an exception or return a false value for an
    # invalid token
    has :validator, classes: [Proc], default: ->(token) { token.valid? }

    has :cookie_name, classes: [String, Symbol], default: :fridge_session
    has :cookie_options, classes: [Hash], default: {}
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fridge-0.4.1 lib/fridge.rb
fridge-0.4.0 lib/fridge.rb