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
passenger-2.2.1 vendor/rack-0.9.1/lib/rack/auth/digest/request.rb
passenger-2.1.3 vendor/rack-0.9.1/lib/rack/auth/digest/request.rb
rack-0.4.0 lib/rack/auth/digest/request.rb
rack-0.9.0 lib/rack/auth/digest/request.rb
rack-0.9.1 lib/rack/auth/digest/request.rb
rack-0.3.0 lib/rack/auth/digest/request.rb
rack-0.2.0 lib/rack/auth/digest/request.rb
sinatra-0.2.2 vendor/rack/lib/rack/auth/digest/request.rb