method

digest_auth_header

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: ActiveResource::Connection

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.2.13) is shown here.

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

        request_uri = uri.path
        request_uri << "?#{uri.query}" if uri.query

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

        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.