Sha256: 76a651f574c348cf8d2dec348fe798f8a7f58ca9946e90d260cf10336b11f8ac

Contents?: true

Size: 852 Bytes

Versions: 10

Compression:

Stored size: 852 Bytes

Contents

require 'logger'

module Warden
  module CookieSession
    class Configuration

      attr_accessor :cookie, :secret, :wrapper, :logger

      # Override defaults for configuration
      # @param cookie [String] cookie name to store encrypted data
      # @param secret [String] secret key(shared between applications) to use in ActiveSupport::MessageEncryptor
      def initialize(cookie = 'cookie_session', secret = nil)
        @cookie = cookie
        @secret = secret
        @logger = Logger.new(STDOUT, level: Logger::INFO, progname: 'CookieSession')
      end

      def serialize_record(record)
        @wrapper&.serialize_record(record)
      end

      def fetch_record(key)
        @wrapper&.fetch_record(key)
      end

      def validate_record(record, salt)
        @wrapper&.validate_record(record, salt)
      end


    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
warden_cookie_session-0.1.2.19275 lib/warden/cookie_session/configuration.rb
warden_cookie_session-0.1.2.19269 lib/warden/cookie_session/configuration.rb
warden_cookie_session-0.1.2.19245 lib/warden/cookie_session/configuration.rb
warden_cookie_session-0.1.2.19222 lib/warden/cookie_session/configuration.rb
warden_cookie_session-0.1.1.19161 lib/warden/cookie_session/configuration.rb
warden_cookie_session-0.1.1.18842 lib/warden/cookie_session/configuration.rb
warden_cookie_session-0.1.0.18828 lib/warden/cookie_session/configuration.rb
warden_cookie_session-0.1.0.18794 lib/warden/cookie_session/configuration.rb
warden_cookie_session-0.1.0.18558 lib/warden/cookie_session/configuration.rb
warden_cookie_session-0.1.0.18557 lib/warden/cookie_session/configuration.rb