-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Support for NTLM #338
Comments
A snippet of what I'm doing: use isahc::{
HttpClient,
auth::{Authentication, Credentials},
config::SslOption,
prelude::*
};
const URL: &str = "...";
fn main() {
let username = read();
let password = read();
let credentials = Credentials::new(username, password);
let client = HttpClient::builder()
.cookies()
.authentication(Authentication::negotiate())
.credentials(credentials)
.ssl_options(SslOption::DANGER_ACCEPT_INVALID_CERTS)
.build().unwrap();
let res = client.get(URL).unwrap();
println!("{:#?}\n{:#?}", res.headers(), res.status());
}
fn read() -> String {
use std::io::{stdin, BufRead};
stdin().lock().lines().next().unwrap().unwrap()
} Response:
|
Thanks for filing an issue! Advanced auth mechanisms such as NLTM are finicky and depend on how underlying libcurl is compiled. This issue may also be related: alexcrichton/curl-rust#359 You can try installling a custom build of libcurl with spnego support enabled and have Isahc use that by disabling the |
@Halkcyon, did you by any chance made this work? |
With #84 -> #115, support was added for SPNEGO, but it seems this only works for the Kerberos sub-mechanism. I have a service that is responding with a
WWW-Authenticate: NTLM
header, but the client is not handling that case.I'm unsure if this is a documentation miss and I'm doing something wrong, or if it's not supported.
The text was updated successfully, but these errors were encountered: