vendor/bundle/ruby/2.1.0/gems/httpauth-0.2.1/lib/httpauth/digest.rb
def validate(options)
        ho = @h.merge(options)
        fail(ArgumentError, "You have to set the :request_body value if you want to use :qop => 'auth-int'") if @h[:qop] == 'auth-int' && ho[:request_body].nil?
        fail(ArgumentError, 'Please specify the request method :method (ie. GET)') if ho[:method].nil?

        calculated_response = Utils.calculate_digest(ho, @s, :request)
        if ho[:response] == calculated_response
          @reason = ''
          return true
        else
          @reason = "Response isn't the same as computed response #{ho[:response]} != #{calculated_response} for #{ho.inspect}"
        end
        false
      end
# Validates the credential information stored in the Credentials instance. Returns <tt>true</tt> or
# <tt>false</tt>. You can read the ue
#
# * <tt>options</tt>: The extra options needed to validate the credentials. A server implementation should
#   provide the <tt>:method</tt> and a <tt>:password</tt> or <tt>:digest</tt>.
#   * <tt>:method</tt>: The HTTP Verb in uppercase, ie. GET or POST.
#   * <tt>:password</tt>: The password for the sent username and realm, either a password or digest should be
#     provided.
#   * <tt>:digest</tt>: The digest for the specified username and realm, either a digest or password should be
#     provided.
Validates the credential information stored in the Credentials instance. Returns true or
false. You can read the ue

options: The extra options needed to validate the credentials. A server implementation should
provide the :method and a :password or :digest.
:method: The HTTP Verb in uppercase, ie. GET or POST.
:password: The password for the sent username and realm, either a password or digest should be
provided.
:digest: The digest for the specified username and realm, either a digest or password should be
provided.
Validates the credential information stored in the Credentials instance . Returns true or false . You can read the ue options : The extra options needed to validate the credentials . A server implementation should provide the : method and a : password or : digest . : method : The HTTP Verb in uppercase ie . GET or POST . : password : The password for the sent username and realm either a password or digest should be provided . : digest : The digest for the specified username and realm either a digest or password should be provided .
def validate(options)
        ho = @h.merge(options)
        fail(ArgumentError, "You have to set the :request_body value if you want to use :qop => 'auth-int'") if @h[:qop] == 'auth-int' && ho[:request_body].nil?
        fail(ArgumentError, 'Please specify the request method :method (ie. GET)') if ho[:method].nil?
        calculated_response = Utils.calculate_digest(ho, @s, :request)
        if ho[:response] == calculated_response
          @reason = ''
          return true
        else
          @reason = "Response isn't the same as computed response #{ho[:response]} != #{calculated_response} for #{ho.inspect}"
        end
        false
      end
def validate ( options ) ho = @h . merge ( options ) fail ( ArgumentError , "You have to set the :request_body value if you want to use :qop => 'auth-int'" ) if @h [ :qop ] == 'auth-int' && ho [ :request_body ] . nil? fail ( ArgumentError , 'Please specify the request method :method (ie. GET)' ) if ho [ :method ] . nil? calculated_response = Utils . calculate_digest ( ho , @s , :request ) if ho [ :response ] == calculated_response @reason = '' return true else @reason = "Response isn't the same as computed response #{ho[:response]} != #{calculated_response} for #{ho.inspect}" end false end
Validates the credential information stored in the Credentials instance.
Validates the credential information stored in the Credentials instance .
options