Skip to content

Conversation

@ashishajr
Copy link
Contributor

Added support for digest auth for both cli option --digest and for Options section along with integration tests. Should ideally close #4547

@ashishajr ashishajr force-pushed the digest branch 3 times, most recently from 356fd1e to 4c0b4e8 Compare December 22, 2025 06:46
@jcamiel
Copy link
Collaborator

jcamiel commented Dec 22, 2025

Hi @ashishajr thanks for the PR, you have to reformat Python files integration/hurl/tests_ok/digest/digest.py with ruff format

@ashishajr ashishajr force-pushed the digest branch 5 times, most recently from ba77698 to 6c0275e Compare December 24, 2025 07:50
@ashishajr
Copy link
Contributor Author

Hi @ashishajr thanks for the PR, you have to reformat Python files integration/hurl/tests_ok/digest/digest.py with ruff format

Should be fixed now, was running it on the wrong ruff version, thanks!

@jcamiel
Copy link
Collaborator

jcamiel commented Dec 24, 2025

Thanks @ashishajr I'm currently on holidays, I'll review the PR in a few days

@ashishajr
Copy link
Contributor Author

Thanks @ashishajr I'm currently on holidays, I'll review the PR in a few days

Sure, thanks, happy holidays!

@jcamiel
Copy link
Collaborator

jcamiel commented Dec 31, 2025

@ashishajr I've rebased the PR

@fabricereix the PR implements --digest. Something worth noting: we're using directly --digest option from libcurl. With this Hurl file:

GET http://localhost:8000/digest
HTTP 200

In this use case, curl will do 2 requests:

  • a first one GET http://localhost:8000/digest that will returns 401
  • a second one GET http://localhost:8000/digest + adding an Authorization header based on the first response. The header is computed by libcurl.

Only the second request is exposed through libcurl, so with --digest we'll expose one request even if there are effectively two requests. I think it's acceptable. Tthe alternative being ourself making the digest authorization workflow, there is more work but it's doable.

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support DIGEST authentication

2 participants