|
|
@ -525,15 +525,15 @@ var module = {};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @type {{sessionId: string, loggedInUser: string, sessionIndex: string, samlToken:
|
|
|
|
* @type {{sessionId: string, loggedInUser: string, sessionIndex: string, samlToken:
|
|
|
|
* string}}
|
|
|
|
* string}}
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
var ssoSession = ssoClient.decodeSAMLLoginResponse(samlResponseObj, samlResponse,
|
|
|
|
var ssoSession = ssoClient.decodeSAMLLoginResponse(samlResponseObj, samlResponse,
|
|
|
|
session.getId());
|
|
|
|
session.getId());
|
|
|
|
if (ssoSession.sessionId) {
|
|
|
|
if (ssoSession.sessionId) {
|
|
|
|
var ssoSessions = getSsoSessions();
|
|
|
|
var ssoSessions = getSsoSessions();
|
|
|
|
ssoSessions[ssoSession.sessionId] = ssoSession;
|
|
|
|
ssoSessions[ssoSession.sessionId] = ssoSession;
|
|
|
|
if (ssoSessions.sessionIndex != null || ssoSessions.sessionIndex != 'undefined') {
|
|
|
|
if (ssoSession.sessionIndex != null || ssoSession.sessionIndex != 'undefined') {
|
|
|
|
module.loadTenant(ssoSessions.loggedInUser);
|
|
|
|
module.loadTenant(ssoSession.loggedInUser);
|
|
|
|
var carbonUser = (require("carbon")).server.tenantUser(ssoSession.loggedInUser);
|
|
|
|
var carbonUser = (require("carbon")).server.tenantUser(ssoSession.loggedInUser);
|
|
|
|
utils.setCurrentUser(carbonUser.username, carbonUser.domain, carbonUser.tenantId);
|
|
|
|
utils.setCurrentUser(carbonUser.username, carbonUser.domain, carbonUser.tenantId);
|
|
|
|
var scriptArgument = {input: {samlToken: ssoSession.samlToken}, user: module.getCurrentUser()};
|
|
|
|
var scriptArgument = {input: {samlToken: ssoSession.samlToken}, user: module.getCurrentUser()};
|
|
|
|