Sha256: 1de8e738558f6b190f03787d683e790beae066abcded2ae91aa5fe0a436e5585

Contents?: true

Size: 731 Bytes

Versions: 48

Compression:

Stored size: 731 Bytes

Contents

require 'rack/auth/abstract/request'
require 'rack/auth/digest/params'
require 'rack/auth/digest/nonce'

module Rack
  module Auth
    module Digest
      class Request < Auth::AbstractRequest

        def method
          @env['REQUEST_METHOD']
        end

        def digest?
          :digest == scheme
        end

        def correct_uri?
          @env['PATH_INFO'] == uri
        end

        def nonce
          @nonce ||= Nonce.parse(params['nonce'])
        end

        def params
          @params ||= Params.parse(parts.last)
        end

        def method_missing(sym)
          if params.has_key? key = sym.to_s
            return params[key]
          end
          super
        end

      end
    end
  end
end

Version data entries

48 entries across 48 versions & 12 rubygems

Version Path
relevance-castronaut-0.5.2 vendor/rack/lib/rack/auth/digest/request.rb
relevance-castronaut-0.5.3 vendor/rack/lib/rack/auth/digest/request.rb
relevance-castronaut-0.5.4 vendor/rack/lib/rack/auth/digest/request.rb
relevance-castronaut-0.6.0 vendor/rack/lib/rack/auth/digest/request.rb
relevance-castronaut-0.6.1 vendor/rack/lib/rack/auth/digest/request.rb
relevance-castronaut-0.7.4 vendor/rack/lib/rack/auth/digest/request.rb
relevance-castronaut-0.7.5 vendor/rack/lib/rack/auth/digest/request.rb
technomancy-rack-0.3.0 lib/rack/auth/digest/request.rb
nbudin-castronaut-0.7.5 vendor/rack/lib/rack/auth/digest/request.rb
merb-core-1.1.3 spec10/public/webrat/test_app/gems/gems/rack-0.4.0/lib/rack/auth/digest/request.rb
merb-core-1.1.2 spec10/public/webrat/test_app/gems/gems/rack-0.4.0/lib/rack/auth/digest/request.rb
merb-core-1.1.1 spec10/public/webrat/test_app/gems/gems/rack-0.4.0/lib/rack/auth/digest/request.rb
merb-core-1.1.0 spec10/public/webrat/test_app/gems/gems/rack-0.4.0/lib/rack/auth/digest/request.rb
merb-core-1.1.0.rc1 spec10/public/webrat/test_app/gems/gems/rack-0.4.0/lib/rack/auth/digest/request.rb
merb-core-1.1.0.pre spec10/public/webrat/test_app/gems/gems/rack-0.4.0/lib/rack/auth/digest/request.rb
mack-0.8.2 lib/gems/rack-0.4.0/lib/rack/auth/digest/request.rb
mack-0.8.3 lib/gems/rack-0.9.1/lib/rack/auth/digest/request.rb
mack-0.8.3.1 lib/gems/rack-0.9.1/lib/rack/auth/digest/request.rb
passenger-2.1.2 vendor/rack-0.9.1/lib/rack/auth/digest/request.rb
passenger-2.2.0 vendor/rack-0.9.1/lib/rack/auth/digest/request.rb