hurl icon indicating copy to clipboard operation
hurl copied to clipboard

Support DIGEST authentication

Open SH-apanagiotidis opened this issue 2 months ago • 2 comments

Problem to solve

It seems hurl does not support DIGEST authentication which is supported in curl via --digest.

Proposal

Similar to basic authentication it should be possible to define something like this:

[DigestAuth]
user: password

This should behave equivalent to --digest --user user:password in curl.

SH-apanagiotidis avatar Nov 11 '25 14:11 SH-apanagiotidis

Hi @SH-apanagiotidis

Instead of creating a new section, we could directly support --digest command line.

Either using command line:

$ hurl --digest --user user:password foo.hurl

Or using [Options] section:

GET https://foo.com
[Options]
user: user:password
digest: true
HTTP 200

jcamiel avatar Nov 11 '25 14:11 jcamiel

As long as it can be used from a hurl file 👍

I mentioned [DigestAuth] to make it similar to [BasicAuth]. I also wonder what happens if one specifies both... last one wins? Or maybe authentication could be an "enum" so that it is impossible to specify both at the same time, e.g.,

[Options]
authentication: basic/digest
user: user:password

SH-apanagiotidis avatar Nov 11 '25 20:11 SH-apanagiotidis