我想通過從Java應用程序傳遞證書登錄到網頁? 我使用下面的代碼,但收到的一些錯誤:我想通過從java應用程序傳遞證書登錄到網頁
HttpClient client = new HttpClient();
client.getParams().setParameter("User Name", "user");
client.getParams().setParameter("Password", "password");
GetMethod request = new GetMethod("url");
錯誤: 信息:可用於NTLM @ 192.168.224.142無憑據:7048
我也曾嘗試下面的代碼:
HttpClient client = new HttpClient();
client.getState().setCredentials(AuthScope.ANY, new NTCredentials("user", "password", "ip:port", "http"));
GetMethod request = new GetMethod("url");
錯誤:信息:驗證失敗使用NTLM
建議通過從Java應用程序傳遞憑據來登錄到網頁?
Ntlm示例https://gist.github.com/virtix/1340440 –