set static port for redirect_uri callback server

This commit is contained in:
Morgan McMillian 2016-08-09 13:27:14 -07:00
parent 70aafb3965
commit c8d1a2d66c
2 changed files with 4 additions and 1 deletions

View file

@ -49,4 +49,7 @@ const QString OAUTH2_KEY_CLIENT_SECRET("client_secret");
const QString OAUTH2_KEY_REDIRECT_URI("redirect_uri");
const QString OAUTH2_KEY_RESPONSE_TYPE("response_type");
// define a static port for the callback server
const quint16 CALLBACK_PORT(31415);
#endif // KQOAUTHGLOBALS_H

View file

@ -133,7 +133,7 @@ void KQOAuthManagerPrivate::emitTokens() {
}
bool KQOAuthManagerPrivate::setupCallbackServer() {
return callbackServer->listen();
return callbackServer->listen(QHostAddress::LocalHost, CALLBACK_PORT);
}