diff --git a/lib/services/sf.js b/lib/services/sf.js index 2ebfa0664..c805b393d 100644 --- a/lib/services/sf.js +++ b/lib/services/sf.js @@ -1478,11 +1478,14 @@ StateRenewing.prototype.enter = function (context) { method: 'POST', url: '/session/token-request', - json: - { - 'REQUEST_TYPE': 'RENEW', - 'oldSessionToken': this.tokenInfo.getSessionToken() - }, + headers: { + CLIENT_APP_ID: this.connectionConfig.getClientType(), + CLIENT_APP_VERSION: this.connectionConfig.getClientVersion(), + }, + json: { + 'REQUEST_TYPE': 'RENEW', + 'oldSessionToken': this.tokenInfo.getSessionToken(), + }, scope: this, callback: function (err, body) { diff --git a/lib/util.js b/lib/util.js index 4deb72c7b..59674b0e9 100644 --- a/lib/util.js +++ b/lib/util.js @@ -473,7 +473,7 @@ exports.getNextSleepTime = getNextSleepTime; * @returns {Boolean} true if it is loginRequest, otherwise false. */ exports.isLoginRequest = function (loginUrl) { - const endPoints = ['/v1/login-request', '/authenticator-request', '/token-request',]; + const endPoints = ['/v1/login-request', '/authenticator-request']; return endPoints.some((endPoint) => loginUrl.includes(endPoint)); } diff --git a/test/unit/util_test.js b/test/unit/util_test.js index 8b90a4683..05859ef51 100644 --- a/test/unit/util_test.js +++ b/test/unit/util_test.js @@ -545,17 +545,7 @@ describe('Util', function () testName: 'test URL with a wrong authenticator-request point', endPoint: '/authenticator-requ', result:false, - }, - { - testName: 'test URL with a right token point', - endPoint: '/token-request', - result:true, - }, - { - testName: 'test URL with a wrong token point', - endPoint: '/tokenRequest', - result:false, - }, + } ]; for (const {testName, endPoint,result} of testCases)