mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
pull state as session UUID from OAuth URL
This commit is contained in:
parent
d942054015
commit
5d5292b4b5
1 changed files with 8 additions and 0 deletions
|
@ -82,6 +82,14 @@ void OAuthWebViewHandler::handleSSLErrors(QNetworkReply* networkReply, const QLi
|
|||
void OAuthWebViewHandler::handleLoadFinished(bool success) {
|
||||
if (success && _activeWebView->url().host() == NodeList::getInstance()->getDomainHandler().getHostname()) {
|
||||
qDebug() << "OAuth authorization code passed successfully to domain-server.";
|
||||
|
||||
// grab the UUID that is set as the state parameter in the auth URL
|
||||
// since that is our new session UUID
|
||||
QUrlQuery authQuery(_activeWebView->url());
|
||||
|
||||
const QString AUTH_STATE_QUERY_KEY = "state";
|
||||
NodeList::getInstance()->setSessionUUID(QUuid(authQuery.queryItemValue(AUTH_STATE_QUERY_KEY)));
|
||||
|
||||
_activeWebView->close();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue