Fixing SSO problem

revert-70aa11f8
Megala 8 years ago
parent 9a958e0bf2
commit 4af2a37d9d

@ -26,7 +26,7 @@ var onFail;
var utility = require("/app/modules/utility.js").utility;
var apiWrapperUtil = require("/app/modules/oauth/token-handlers.js")["handlers"];
if (context.input.samlToken) {
apiWrapperUtil.setupTokenPairBySamlGrantType(context.input.username, context.input.samlToken);
apiWrapperUtil.setupTokenPairBySamlGrantType(context.user.username, context.input.samlToken);
} else {
apiWrapperUtil.setupTokenPairByPasswordGrantType(context.input.username, context.input.password);
}

@ -364,10 +364,10 @@ var module = {};
* samlToken: string}>} SSO sessions
*/
function getSsoSessions() {
var ssoSessions = session.get(constants.CACHE_KEY_SSO_SESSIONS);
var ssoSessions = application.get('sso_sessions');
if (!ssoSessions) {
ssoSessions = {};
session.put(constants.CACHE_KEY_SSO_SESSIONS, ssoSessions);
application.put('sso_sessions', ssoSessions);
}
return ssoSessions;
}

Loading…
Cancel
Save