Sha256: 7b3e9384abf97653c6f762e4ca7d725a24d139a7b008ea6629e9032056dcbfb2

Contents?: true

Size: 812 Bytes

Versions: 54

Compression:

Stored size: 812 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['rack.methodoverride.original_method'] || @env['REQUEST_METHOD']
        end

        def digest?
          :digest == scheme
        end

        def correct_uri?
          (@env['SCRIPT_NAME'].to_s + @env['PATH_INFO'].to_s) == 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

54 entries across 53 versions & 16 rubygems

Version Path
kjvarga-rack-1.0.0 lib/rack/auth/digest/request.rb
qoobaa-rack-1.0.0.1 lib/rack/auth/digest/request.rb
qoobaa-rack-1.0.2 lib/rack/auth/digest/request.rb
timocratic-rack-1.0.0 lib/rack/auth/digest/request.rb
rack-1.2.8 lib/rack/auth/digest/request.rb
rack-1.1.6 lib/rack/auth/digest/request.rb
rack-1.2.7 lib/rack/auth/digest/request.rb
rack-1.1.5 lib/rack/auth/digest/request.rb
rack-1.2.6 lib/rack/auth/digest/request.rb
rack-1.1.4 lib/rack/auth/digest/request.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/rack-1.1.3/lib/rack/auth/digest/request.rb
rack-1.2.5 lib/rack/auth/digest/request.rb
rack-1.1.3 lib/rack/auth/digest/request.rb
vanity-1.7.1 vendor/ruby/1.9.1/gems/rack-1.1.2/lib/rack/auth/digest/request.rb
rack-1.2.4 lib/rack/auth/digest/request.rb
rack-1.2.3 lib/rack/auth/digest/request.rb
rack-1.2.2 lib/rack/auth/digest/request.rb
rack-1.1.2 lib/rack/auth/digest/request.rb
rack-1.1.1 lib/rack/auth/digest/request.rb
rack-1.1.1.pre lib/rack/auth/digest/request.rb