method

digest_auth_header

Importance_0
v3.1.0 - Show latest stable - 0 notes - Class: ActiveResource::Connection
digest_auth_header(http_method, uri) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activeresource/lib/active_resource/connection.rb, line 238
      def digest_auth_header(http_method, uri)
        params = extract_params_from_response

        ha1 = Digest::MD5.hexdigest("#{@user}:#{params['realm']}:#{@password}")
        ha2 = Digest::MD5.hexdigest("#{http_method.to_s.upcase}:#{uri.path}")

        params.merge!('cnonce' => client_nonce)
        request_digest = Digest::MD5.hexdigest([ha1, params['nonce'], "0", params['cnonce'], params['qop'], ha2].join(":"))
        "Digest #{auth_attributes_for(uri, request_digest, params)}"
      end
Register or log in to add new notes.