我正在使用 NTLMv1,它工作正常。唯一的缺点是,如果我登录一次,它会访问 LDAP 服务器 3 到 4 次。
所以我不想要那个。谁能解释一下这个过程在 NTLMv2 中是如何进行的?
下面是 NTLMv2 的代码
<filter>
<filter-name>ntlmv2-auth</filter-name>
<filter-class>org.ntlmv2.filter.NtlmFilter</filter-class>
<init-param>
<!-- Windows domain name -->
<param-name>ntlm-domain</param-name>
<param-value>ACME.CORP</param-value>
</init-param>
<init-param>
<!-- IP-address of domain controller -->
<param-name>ntlm-dc</param-name>
<param-value>dcone.acme.com</param-value>
</init-param>
<init-param>
<!-- Simple (non-FQDN) hostname of DC host -->
<param-name>ntlm-dc-name</param-name>
<param-value>dcone</param-value>
</init-param>
<init-param>
<!-- Computer account for connection to DC -->
<param-name>ntlm-account</param-name>
<param-value>TECHUSER$@ACME.CORP</param-value>
</init-param>
<init-param>
<!-- Password of computer account -->
<param-name>ntlm-password</param-name>
<param-value>test1234</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>NTLMv2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>