I am having issues passing the current logged in user's credentials in to a REST API call. Here is the scenario:
I have a SP 2010 hosted site that has a web part that makes a REST API call to SharePoint 2013 search center to get the results.
I open the SharePoint 2010 site with windows authentication and then use sign in as different user option to log in using a different credential. Since the permissions for me and the second user is different the REST API call should return different results but it is returning the same number of results as the call is taking the credentials from the browser and not from SharePoint 2010.
Any pointers on how to pass the current logged in user's credentials would be helpful.