Sha256: e004426ebf9a70ff5b6ba01f5076a5a2a9c94388cd7b536bf7eb633faf73f8e5

Contents?: true

Size: 817 Bytes

Versions: 1

Compression:

Stored size: 817 Bytes

Contents

module Rack
  module SimpleAuth
    module HMAC
      # class Config
      # Config objects will be instantiated out of this class when using Rack::SimpleAuth::HMAC::Middleware
      # Also the public instance attributes / virtual attributes will be populated via the Middleware DSL
      class Config < Hash
        attr_writer :tolerance, :stepsize
        attr_writer :secret, :signature
        attr_accessor :logpath, :request_config

        def method_missing(name, *args)
          fail "Unkown option #{name.to_s.gsub!('=', '')}"
        end

        def tolerance
          @tolerance || 1
        end

        def stepsize
          @stepsize || 1
        end

        def secret
          @secret || ''
        end

        def signature
          @signature || ''
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rack-simple_auth-1.0.0rc lib/rack/simple_auth/hmac/config.rb