mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
fix oidc connector scope parsing in case of QT >= 9.0
This commit is contained in:
parent
23f5abe0f1
commit
c0ad0de987
1 changed files with 6 additions and 1 deletions
|
|
@ -90,7 +90,7 @@ OIDCModel::OIDCModel(const std::shared_ptr<linphone::AuthInfo> &authInfo, QObjec
|
|||
mOidc.setClientIdentifierSharedKey(clientSecret->getClientSecret().c_str());
|
||||
}
|
||||
|
||||
QSet<QByteArray> scopeTokens = {OIDCScope};
|
||||
QSet<QByteArray> scopeTokens;
|
||||
if (autorizationUrl.hasQuery()) {
|
||||
QUrlQuery query(autorizationUrl);
|
||||
if (query.hasQueryItem("scope")) {
|
||||
|
|
@ -100,6 +100,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