PDA

View Full Version : [solved] Basic Authentication with QNAM is not working correctly



nightghost
3rd March 2011, 17:01
EDIT: Ok, forget it. I am just to stupid to enter "test" correctly... :o The code is working fine. Time to go home.

Here was the code:


void WebkitViewer::authenticationRequired(QNetworkReply * reply, QAuthenticator* authenticator) {

AuthentificationDialog dialog(getViewerWidget());
dialog.setInformation(reply->url(), authenticator->realm());

if(dialog.exec() == QDialog::Accepted) {
authenticator->setUser(dialog.getUserName());
authenticator->setPassword(dialog.getPassword());
}
}