简体   繁体   中英

How to add authentication info in java client?

How to configure authentication in a java client, I tried creating new Authenticator object & calling it is set Default method, but I am still getting the following error:

java.io.IOException: Authentication failure
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1096)
    at UrlProxy.main(UrlProxy.java : 54)

Please let me know if I need to set any other additional properties. I am opening the connection to my target site using HttpUrlconnection class.

在我的情况下,问题似乎是,服务器期望使用NTLM代理,而我以明文形式发送凭据,更改此选项后即可正常工作。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM