空手道框架中REST API的NTLM身份验证

空手道框架中REST API的NTLM身份验证

问题描述:

有没有人尝试过可以在空手道框架中实现的NTLM身份验证?尝试构建测试并传递标头参数时,出现401授权问题.

Have anyone tried NTLM authentication implemented in Karate framework which i could refer? I get 401 authorization issue while I try building a test and pass header argument.

@BeforeClass
public static void before() {
    System.setProperty("http.auth.ntlm.domain", "***");
    System.setProperty("jcifs.smb.client.domain", "***");
    System.setProperty("jcifs.smb.client.username", "***");
    System.setProperty("jcifs.smb.client.password", "***");
    System.setProperty("java.protocol.handler.pkgs", "jcifs");
}

不幸的是,在空手道中尚未实现NTLM支持.有一个开放功能请求: https://github.com/intuit/karate/issues/372 我们需要您或其他人从开源社区中贡献出来.

Unfortunately NTLM support is not yet implemented in Karate. There is an open feature request: https://github.com/intuit/karate/issues/372 We'll need you or someone to contribute this from the open-source community.

与此同时,您应该能够通过使用执行必要身份验证的Java库或自定义Java代码来解决此问题.请参阅空手道文档的Java互操作部分: https://github.com/intuit /karate#calling-java

Meanwhile you should be able to work-around this by using a Java library or custom Java code that does the necessary authentication. Refer to the Java inter-op section of the Karate documentation: https://github.com/intuit/karate#calling-java

另请参见 https://stackoverflow.com/a/51150286/143475

编辑-您可以使用curl https://stackoverflow.com/a/64352676/143475

EDIT - you can use curl ! https://stackoverflow.com/a/64352676/143475