Hi,
I am doing application using Net weaver gateway and sapui5 . In that I am passing username and password along with service URL like below.
var oModel = new sap.ui.model.ODataModel(sServiceUrl, true, "username", "pwd");
Now I want to pass these username and password values dynamically.
For that I designed login screen and passing that username and password dynamically to the ODataModel when click on login Button. When I am sending proper values it goes to back end and working fine.
But when I enter wrong username and passwords I am getting browser related Login screen on the top of my login screen and when I cancel that I am getting 401 unauthorized error .
Please find the below images
- How to prevent that browser related authentication screen when End user enter wrong inputs?
- How to catch that 401 error if login failed?
Please help me to resolve.
Thanks&Regards
Sridevi