added NTLM auth support

This commit is contained in:
Philipp Crocoll 2013-11-01 10:28:37 +01:00
parent 319d1c7541
commit 277f1b46ad

View File

@ -216,9 +216,15 @@ namespace KeePassLib.Serialization
{
var credentialCache = new CredentialCache();
credentialCache.Add(
new Uri(new Uri(ioc.Path).GetLeftPart(UriPartial.Authority)),
"Digest",
new NetworkCredential(ioc.UserName, ioc.Password)
);
credentialCache.Add(
new Uri(new Uri(ioc.Path).GetLeftPart(UriPartial.Authority)),
"Digest",
"NTLM",
new NetworkCredential(ioc.UserName, ioc.Password)
);
@ -254,9 +260,14 @@ namespace KeePassLib.Serialization
if (digestAuth)
{
var credentialCache = new CredentialCache();
credentialCache.Add(
new Uri(new Uri(ioc.Path).GetLeftPart(UriPartial.Authority)), // request url's host
"Digest", // authentication type
new NetworkCredential(ioc.UserName, ioc.Password) // credentials
);
credentialCache.Add(
new Uri(new Uri(ioc.Path).GetLeftPart(UriPartial.Authority)), // request url's host
"Digest", // authentication type
"NTLM", // authentication type
new NetworkCredential(ioc.UserName, ioc.Password) // credentials
);