Skip to content

Commit

Permalink
Merge branch 'master' into SNOW-502598-async-query-exec
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-ext-simba-lf authored Nov 2, 2023
2 parents 46748bb + 6cc2fda commit 6944e99
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
13 changes: 8 additions & 5 deletions lib/services/sf.js
Original file line number Diff line number Diff line change
Expand Up @@ -1485,11 +1485,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)
{
Expand Down
2 changes: 1 addition & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down
12 changes: 1 addition & 11 deletions test/unit/util_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6944e99

Please sign in to comment.