From 50e90d6c7b61f33f3a64cd8266dd7d289bd945f6 Mon Sep 17 00:00:00 2001 From: jstephens7 Date: Tue, 7 Aug 2018 08:04:26 -0500 Subject: [PATCH] Fix for session participants The internal SessionParticipants is not exposed, so we should assume they are sending us an array of session participants rather than an instance of the SessionParticipants. If we send an array, currently we get an error similar to "options.sessionParticipants.get is not a function" because it's an array instead of the unexposed SessionParticipants. --- lib/logout.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/logout.js b/lib/logout.js index 7e28423..27d1297 100644 --- a/lib/logout.js +++ b/lib/logout.js @@ -16,7 +16,7 @@ var STATUS = constants.STATUS; // Analyze if we should merge session handler and store module.exports.logout = function (options) { - options.sessionParticipants = options.sessionParticipants || new SessionParticipants(); + options.sessionParticipants = new SessionParticipants(options.sessionParticipants) || new SessionParticipants(); options.clearIdPSession = options.clearIdPSession || function (cb){ return cb(); }; options.store = options.store || new SessionStore({ key: '_logoutState'}); @@ -378,4 +378,4 @@ module.exports.sendLogoutError = function(options){ return prepareAndSendToken(req, res, 'LOGOUT_RESPONSE', logoutResponse, options, next); }; -}; \ No newline at end of file +};