Skip to content

getinfo: provide info which auth was used for HTTP and proxy #15450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

bagder
Copy link
Member

@bagder bagder commented Oct 29, 2024

CURLINFO_HTTPAUTH_USED and CURLINFO_PROXYAUTH_USED

Ref: #12668
Idea-by: Ganesh Viswanathan

  • initial implementation
  • document both options
  • make sure NTLM is reported on subsequent requests
  • properly tested
  • save exposing it in the curl tool for later

@bagder bagder added HTTP feature-window A merge of this requires an open feature window authentication libcurl API labels Oct 29, 2024
@github-actions github-actions bot added the tests label Oct 29, 2024
@dfandrich

This comment was marked as outdated.

CURLINFO_HTTPAUTH_USED and CURLINFO_PROXYAUTH_USED

Tested in 590

Ref: #12668
Idea-by: Ganesh Viswanathan
Closes #15450
@bagder bagder force-pushed the bagder/used-auth-info branch from c18470c to b4673ae Compare December 23, 2024 12:31
@bagder bagder marked this pull request as ready for review December 23, 2024 12:39
@bagder bagder closed this in 9d5ecc9 Dec 23, 2024
@bagder bagder deleted the bagder/used-auth-info branch December 23, 2024 22:04
@genotrance
Copy link

genotrance commented Feb 27, 2025

Thank you for implementing this! I'm looking into incorporating the feature. Meanwhile, these doc links aren't working:

https://curl.se/libcurl/c/CURLINFO_PROXYAUTH_USED.html
https://curl.se/libcurl/c/CURLINFO_HTTPAUTH_USED.html

I got those links from https://curl.se/libcurl/c/symbols-in-versions.html.

They are not linked on https://curl.se/libcurl/c/curl_easy_getinfo.html though.

@bagder
Copy link
Member Author

bagder commented Feb 27, 2025

Oops. Thanks for pointing this out. There was a minor breakage on the site, but it should be fixed now and those URLs should work momentarily. 🤕

@genotrance
Copy link

I just tested this out and looks like BASIC auth is incorrectly returning 0 instead of 1.

DIGEST and NTLM seem to work fine. I am unable to test the other auth mechanisms to verify those

@jay
Copy link
Member

jay commented Mar 1, 2025

I just tested this out and looks like BASIC auth is incorrectly returning 0 instead of 1.

DIGEST and NTLM seem to work fine. I am unable to test the other auth mechanisms to verify those

Please open an issue if you've spotted a bug

pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
CURLINFO_HTTPAUTH_USED and CURLINFO_PROXYAUTH_USED

Tested in 590 and 694

Ref: curl#12668
Idea-by: Ganesh Viswanathan
Closes curl#15450
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants