diff options
Diffstat (limited to 'web/main.js')
-rw-r--r-- | web/main.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/web/main.js b/web/main.js index 21f639d..67d4274 100644 --- a/web/main.js +++ b/web/main.js @@ -132,7 +132,7 @@ var guiHandlers = { handleResponse = function (res) { var chunks = [], status = res.statusCode, - headers, i, m; + headers, i, m, pythonRequest, keys; if (status !== 200) { guiResponse.code = -2; guiResponse.message = 'Received an error from the identity server: ' + status + ' ' + res.statusMessage; @@ -157,7 +157,7 @@ var guiHandlers = { catch (e) { guiResponse.code = -3; guiResponse.message = 'Response from the identity server is not a JSON: ' + e; - logger.error(guiResponse.message + '\n' + chunks.join(''), e); + logException(guiResponse.message + '\n' + chunks.join(''), e); session.send(guiResponse); return; } @@ -167,14 +167,15 @@ var guiHandlers = { session.send(guiResponse); } else { - sendDataToPython({'action': 'saml_login', 'tid': message.tid, 'sid': message.sid, 'data': m.data && m.data.userData}) + message.saml_data = m.data && m.data.userData; // add the data from SAML authentication, and forward everything to Python + sendDataToPython(message) .then(function (jsonReply) { session.samlData = m.data; // perhaps we'll need the SAML data in the future session.send(jsonReply); }, function (exc) { guiResponse.code = -6; guiResponse.message = 'Python processing of SAML login generated an error: ' + exc; - logger.error(guiResponse.message, exc); + logException(guiResponse.message, exc); session.send(guiResponse); }) .done(); |