diff --git a/services/web/app/src/Features/SamlLog/SamlLogHandler.js b/services/web/app/src/Features/SamlLog/SamlLogHandler.js index e8ddd6897b..2069fac4be 100644 --- a/services/web/app/src/Features/SamlLog/SamlLogHandler.js +++ b/services/web/app/src/Features/SamlLog/SamlLogHandler.js @@ -21,7 +21,7 @@ async function log(req, data, samlAssertion) { const { saml } = req.session const userId = SessionManager.getLoggedInUserId(req.session) - providerId = (req.session.saml?.universityId || '').toString() + providerId = (req.session.saml?.providerId || '').toString() sessionId = (req.sessionID || '').toString().substr(0, 8) const samlLog = new SamlLog() diff --git a/services/web/test/unit/src/SamlLog/SamlLogHandlerTests.js b/services/web/test/unit/src/SamlLog/SamlLogHandlerTests.js index c3ac36dacf..d1c2e1058a 100644 --- a/services/web/test/unit/src/SamlLog/SamlLogHandlerTests.js +++ b/services/web/test/unit/src/SamlLog/SamlLogHandlerTests.js @@ -32,7 +32,7 @@ describe('SamlLogHandler', function () { beforeEach(async function () { await SamlLogHandler.promises.log( { - session: { saml: { universityId: providerId } }, + session: { saml: { providerId } }, sessionID: sessionId, path: '/saml/ukamf', }, @@ -46,7 +46,7 @@ describe('SamlLogHandler', function () { samlLog.jsonData.should.equal( JSON.stringify({ foo: true, - samlSession: { universityId: 'provider-id' }, + samlSession: { providerId: 'provider-id' }, }) ) expect(samlLog.data).to.be.undefined @@ -61,7 +61,7 @@ describe('SamlLogHandler', function () { await SamlLogHandler.promises.log( { - session: { saml: { universityId: providerId } }, + session: { saml: { providerId } }, sessionID: sessionId, path: '/saml/ukamf', },