From 90e2ae1dccc8e6d17fdc1f33718a0a1ce2a8197f Mon Sep 17 00:00:00 2001 From: Peter Cai <222655+pcai@users.noreply.github.com> Date: Sat, 6 Jul 2024 17:54:03 +0000 Subject: [PATCH] skip digest authentication tests; implementation is removed in rack 3.1 --- spec/integration/curb_spec.rb | 3 ++- spec/integration/httpclient_spec.rb | 3 ++- spec/integration/support/application.rb | 13 ++----------- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/spec/integration/curb_spec.rb b/spec/integration/curb_spec.rb index e130ce82..498ded23 100644 --- a/spec/integration/curb_spec.rb +++ b/spec/integration/curb_spec.rb @@ -82,7 +82,8 @@ expect(response.body).to eq("basic-auth") end - it "supports digest authentication" do + # Rack::Auth::Digest is removed in Rack 3.1 + xit "supports digest authentication" do request = HTTPI::Request.new(@server.url + "digest-auth") request.auth.digest("admin", "secret") diff --git a/spec/integration/httpclient_spec.rb b/spec/integration/httpclient_spec.rb index 3baac33b..f4d63160 100644 --- a/spec/integration/httpclient_spec.rb +++ b/spec/integration/httpclient_spec.rb @@ -79,7 +79,8 @@ expect(response.body).to eq("basic-auth") end - it "supports digest authentication" do + # Rack::Auth::Digest is removed in Rack 3.1 + xit "supports digest authentication" do request = HTTPI::Request.new(@server.url + "digest-auth") request.auth.digest("admin", "secret") diff --git a/spec/integration/support/application.rb b/spec/integration/support/application.rb index 0f6d26c6..b6c80e63 100644 --- a/spec/integration/support/application.rb +++ b/spec/integration/support/application.rb @@ -78,19 +78,10 @@ def self.respond_with(body) end map "/digest-auth" do - unprotected_app = lambda { |env| + # Rack::Auth::Digest is removed in Rack 3.1 + run lambda { |env| IntegrationServer.respond_with "digest-auth" } - - realm = 'digest-realm' - app = Rack::Auth::Digest::MD5.new(unprotected_app) do |username| - username == 'admin' ? Digest::MD5.hexdigest("admin:#{realm}:secret") : nil - end - app.realm = realm - app.opaque = 'this-should-be-secret' - app.passwords_hashed = true - - run app end end