Skip to content

Commit

Permalink
fix Bug 66423
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolayRechkin committed Dec 3, 2024
1 parent 36dfb94 commit 73e6295
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions common/ASC.SsoAuth/app/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@ module.exports = function (app, config) {
return res.redirect(request.context);
}
}
function getValueByKeyIgnoreCase(obj, key) {
const entry = Object.entries(obj).find(([k]) => k.toLowerCase() === key.toLowerCase());
return entry ? entry[1] : undefined;
}

const createAuthnTemplateCallback = (_idp, _sp, method) => (template) => {
const metadata = { idp: _idp.entityMeta, sp: _sp.entityMeta };
Expand Down Expand Up @@ -567,8 +571,8 @@ module.exports = function (app, config) {

//const logoutUser = new LogoutModel(userData.NameId, userData.SessionId);
const user = {
logoutNameID: userData.NameId,
sessionIndex: userData.SessionId,
logoutNameID: getValueByKeyIgnoreCase(userData, "NameId"),
sessionIndex: getValueByKeyIgnoreCase(userData, "SessionId")
};

const data = sp.createLogoutRequest(
Expand Down

0 comments on commit 73e6295

Please sign in to comment.