Closed pj892031 closed 1 year ago
Looks like the test case is if you pass some invalid credentials into the desktop login, then you'd like to see success:false (such as on the other side, in webauth.js) but if you see undefined instead, then that's what you're pointing out?
The catch block in the if (request.body) clause of the authenticate method returns a new Promise that resolves with an object {success: false}. However, this Promise is not returned from the authenticate method, and therefore, the result will not be used or processed by the calling code.
Fix merged now, thank you @hrshkshri
Happy to Contribute!
Describe the bug
At the line https://github.com/zowe/zlux-server-framework/blob/v2.x/staging/plugins/sso-auth/lib/apimlHandler.js#LL142C1-L142C1 is very probably a bug:
The code
Promise.resolve({success: false});
creates a new object and the result will disappear. There should be removed partPromise.
to call the method of lambda.