Environment :
iVend 6.6
Problem Statement :
In Soup UI all API's are exposed , if any end user can use API and see the transaction without any API token. API is configured in unauthenticated access , now we need to configure basic authentication that how to set username and password to get and post API in settings.
Symptoms :
Product Query
Resolution/Work Around :
The hardcoded API token is for mobile user. Need to add "UserName", "Password" with values to request Header.
HttpClient client = new HttpClient();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/xml"));
client.DefaultRequestHeaders.Add("username", "APIUSER");
client.DefaultRequestHeaders.Add("password", "APIPASSWORD");
client.BaseAddress = new Uri(endPoint);
Recommendations /Suggestion : N/A