[英]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客户端中配置身份验证,我尝试创建新的Authenticator
对象并调用将其设置为Default方法,但是仍然出现以下错误:
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. 我正在使用HttpUrlconnection
类打开到目标站点的连接。
在我的情况下,问题似乎是,服务器期望使用NTLM代理,而我以明文形式发送凭据,更改此选项后即可正常工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.