NTLM身份验证失败

时间:2017-08-09 19:57:49

标签: java authentication ntlm

我正在尝试使用某些Java代码进行NTLM身份验证,但获得401'd。

This page让我想到以下代码(NTLMEngineImpl的源代码来自Apache HTTPClient并稍微修改here):

System.out.println(new NTLMEngineImpl().generateType3Msg("Zaphod", "Beeblebrox", "Ursa-Minor", "LightCity", "TlRMTVNTUAACAAAAAAAAACgAAAABggAAU3J2Tm9uY2UAAAAAAAAAAA=="));

应输出:

TlRMTVNTUAADAAAAGAAYAHIAAAAYABgAigAAABQAFABAAAAADAAMAFQAAAASABIAYAAAAAAAAACiAAAAAYIAAFUAUgBTAEEALQBNAEkATgBPAFIAWgBhAHAAaABvAGQATABJAEcASABUAEMASQBUAFkArYfKbe/jRoW5xDxHeoxC1gBmfWiS5+iX4OAN4xBKG/IFPwfH3agtPEia6YnhsADT

相反,我得到:

TlRMTVNTUAADAAAAGAAYAEgAAAAYABgAYAAAABQAFAB4AAAADAAMAIwAAAASABIAmAAAAAAAAACqAAAAAYIAAgUBKAoAAAAPrYfKbe/jRoW5xDxHeoxC1gBmfWiS5+iX4OAN4xBKG/IFPwfH3agtPEia6YnhsADTVQBSAFMAQQAtAE0ASQBOAE8AUgBaAGEAcABoAG8AZABMAGkAZwBoAHQAQwBpAHQAeQA=

看起来很接近 - 我认为预期的字符串几乎是,但不完全是实际字符串的子字符串。那么额外数据来自何处以及如何解决?

0 个答案:

没有答案