From 0ce8e3171b22e254715b38d28adf03404921792e Mon Sep 17 00:00:00 2001 From: Fabien O'Carroll Date: Thu, 5 Nov 2020 13:07:56 +0000 Subject: [PATCH] Bound SSOAdapter methods to their instance no-issue This allows custom SSO adapters to store instance config and refer to in their methods --- core/server/services/auth/session/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/server/services/auth/session/index.js b/core/server/services/auth/session/index.js index 2a66cd4090..49c0ddcb99 100644 --- a/core/server/services/auth/session/index.js +++ b/core/server/services/auth/session/index.js @@ -43,7 +43,7 @@ const ssoAdapter = adapterManager.getAdapter('sso'); module.exports.createSessionFromToken = sessionFromToken({ callNextWithError: false, createSession: sessionService.createSessionForUser, - findUserByLookup: ssoAdapter.getUserForIdentity, - getLookupFromToken: ssoAdapter.getIdentityFromCredentials, - getTokenFromRequest: ssoAdapter.getRequestCredentials + findUserByLookup: ssoAdapter.getUserForIdentity.bind(ssoAdapter), + getLookupFromToken: ssoAdapter.getIdentityFromCredentials.bind(ssoAdapter), + getTokenFromRequest: ssoAdapter.getRequestCredentials.bind(ssoAdapter) });