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
3mix-castronaut-0.5.0.2 vendor/rack/lib/rack/auth/digest/request.rb
kastner-rack-0.3.171 lib/rack/auth/digest/request.rb
kastner-rack-0.3.186 lib/rack/auth/digest/request.rb
masover-castronaut-0.4.4.4 vendor/rack/lib/rack/auth/digest/request.rb
masover-castronaut-0.4.4.5 vendor/rack/lib/rack/auth/digest/request.rb
masover-castronaut-0.5.0.1 vendor/rack/lib/rack/auth/digest/request.rb
p8-castronaut-0.6.1.1 vendor/rack/lib/rack/auth/digest/request.rb
relevance-castronaut-0.2.0 vendor/rack/lib/rack/auth/digest/request.rb
relevance-castronaut-0.2.5 vendor/rack/lib/rack/auth/digest/request.rb
relevance-castronaut-0.3.0 vendor/rack/lib/rack/auth/digest/request.rb
relevance-castronaut-0.3.5 vendor/rack/lib/rack/auth/digest/request.rb
relevance-castronaut-0.3.6 vendor/rack/lib/rack/auth/digest/request.rb
relevance-castronaut-0.4.1 vendor/rack/lib/rack/auth/digest/request.rb
relevance-castronaut-0.4.2 vendor/rack/lib/rack/auth/digest/request.rb
relevance-castronaut-0.4.3 vendor/rack/lib/rack/auth/digest/request.rb
relevance-castronaut-0.4.4 vendor/rack/lib/rack/auth/digest/request.rb
relevance-castronaut-0.4.5 vendor/rack/lib/rack/auth/digest/request.rb
relevance-castronaut-0.4.6 vendor/rack/lib/rack/auth/digest/request.rb
relevance-castronaut-0.5.0 vendor/rack/lib/rack/auth/digest/request.rb
relevance-castronaut-0.5.1 vendor/rack/lib/rack/auth/digest/request.rb