1 Qter豆
QNetworkAccessManager* m_pNetworkManager = new QNetworkAccessManager(this);
connect(m_pNetworkManager, SIGNAL(authenticationRequired(QNetworkReply*, QAuthenticator*)),
SLOT(slot_authenticationRequired(QNetworkReply*, QAuthenticator*)));
m_pNetworkReply = m_pNetworkManager->post(netRequest,contentByteArray);//发起post请求
void Httpxxx::slot_authenticationRequired(QNetworkReply *reply, QAuthenticator *auth)
{
auth->setUser(m_strUserName);
auth->setPassword(m_strPassWord);
}
非域用户的情况下在发送post请求后,会调用slot_authenticationRequired,为什么域用户的情况下就不再调用了,而是直接用当前登录的域用户进行了验证,想用自己设置的其它用户登录应该如何设置?
官方文档有这么一句话,但不知道如何处理?
在QAuthenticator的说明中:
NTLM version 2
The NTLM authentication mechanism currently supports no incoming or outgoing options. On Windows, if no user has been set ,domain\user credentials will be searched for on the local system to enable Single-Sign-On functionality.
这个no user has been set ,如何 进行set ?
我来回答