2012-05-25 10:13:17 -04:00
|
|
|
#include "Authenticate.h"
|
|
|
|
#include "WebPage.h"
|
|
|
|
#include "NetworkAccessManager.h"
|
|
|
|
|
2012-07-08 15:04:30 -04:00
|
|
|
Authenticate::Authenticate(WebPageManager *manager, QStringList &arguments, QObject *parent) : SocketCommand(manager, arguments, parent) {
|
2012-05-25 10:13:17 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void Authenticate::start() {
|
|
|
|
QString username = arguments()[0];
|
|
|
|
QString password = arguments()[1];
|
|
|
|
|
2012-11-22 00:21:40 -05:00
|
|
|
NetworkAccessManager* networkAccessManager = page()->networkAccessManager();
|
2012-05-25 10:13:17 -04:00
|
|
|
networkAccessManager->setUserName(username);
|
|
|
|
networkAccessManager->setPassword(password);
|
|
|
|
|
|
|
|
emit finished(new Response(true));
|
|
|
|
}
|
|
|
|
|