mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-04-17 20:08:28 +00:00
fix oidc connector scope parsing in case of QT >= 9.0
This commit is contained in:
parent
5a956ff655
commit
3240f0f757
1 changed files with 6 additions and 1 deletions
|
|
@ -81,7 +81,7 @@ OIDCModel::OIDCModel(const std::shared_ptr<linphone::AuthInfo> &authInfo, QObjec
|
|||
mOidc.setClientIdentifierSharedKey(clientSecret->getPassword().c_str());
|
||||
}
|
||||
|
||||
QSet<QByteArray> scopeTokens = {OIDCScope};
|
||||
QSet<QByteArray> scopeTokens;
|
||||
if (autorizationUrl.hasQuery()) {
|
||||
QUrlQuery query(autorizationUrl);
|
||||
if (query.hasQueryItem("scope")) {
|
||||
|
|
@ -91,6 +91,11 @@ OIDCModel::OIDCModel(const std::shared_ptr<linphone::AuthInfo> &authInfo, QObjec
|
|||
}
|
||||
}
|
||||
}
|
||||
if (scopeTokens.isEmpty()) {
|
||||
scopeTokens.insert(OIDCScope);
|
||||
qDebug() << "No scope found in authorization URL, using default scope [" << OIDCScope << "]";
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
|
||||
mOidc.setRequestedScopeTokens(scopeTokens);
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue