mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fixing the problem of common log out
This commit is contained in:
parent
b10c323582
commit
e5870e1306
@ -486,14 +486,11 @@ var module = {};
|
||||
*/
|
||||
module.ssoAcs = function (request, response) {
|
||||
var samlResponse = request.getParameter("SAMLResponse");
|
||||
if (!samlResponse) {
|
||||
var msg = "SAML response is not found in request parameters.";
|
||||
log.error(msg);
|
||||
response.sendError(400, msg);
|
||||
return;
|
||||
}
|
||||
var samlRequest = request.getParameter('SAMLRequest');
|
||||
var ssoClient = require("sso").client;
|
||||
var samlResponseObj;
|
||||
|
||||
if (samlResponse) {
|
||||
try {
|
||||
samlResponseObj = ssoClient.getSamlObject(samlResponse);
|
||||
} catch (e) {
|
||||
@ -548,6 +545,16 @@ var module = {};
|
||||
response.sendError(500, msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (samlRequest) {
|
||||
var index = ssoClient.decodeSAMLLogoutRequest(ssoClient.getSamlObject(samlRequest));
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Back end log out request received for the session Id : " + index);
|
||||
}
|
||||
var jSessionId = getSsoSessions()[index];
|
||||
delete getSsoSessions()[index];
|
||||
session.invalidate();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user