Skip to content

Commit b50c5d3

Browse files
Added HTTP Auto authentication. (#477)
This is a combination of CURLAUTH_BASIC, CURLAUTH_DIGEST, CURLAUTH_GSSNEGOTIATE and CURLAUTH_NTLM.
1 parent a4958d1 commit b50c5d3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/easy/handler.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3779,6 +3779,14 @@ impl Auth {
37793779
self.flag(curl_sys::CURLAUTH_AWS_SIGV4, on)
37803780
}
37813781

3782+
/// HTTP Auto authentication.
3783+
///
3784+
/// This is a combination for CURLAUTH_BASIC | CURLAUTH_DIGEST |
3785+
/// CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM
3786+
pub fn auto(&mut self, on: bool) -> &mut Auth {
3787+
self.flag(curl_sys::CURLAUTH_ANY, on)
3788+
}
3789+
37823790
fn flag(&mut self, bit: c_ulong, on: bool) -> &mut Auth {
37833791
if on {
37843792
self.bits |= bit as c_long;

0 commit comments

Comments
 (0)