For a sharepoint 2013 application I need to create a custom button in the ribbon. When the button is pressed a request will be send to a service on another machine (WebAPI or WCF, I will create this by myself so I have the choice...). One requirement is to use Windows Authentication to authenticate the user on Sharepoint and the same identity need to be transfered to the other machine. This because a request must be made on the WebAPI-/WCF service on behalf of the user that pressed the button.
An example: User1 presses the button, a request will be made to the WebAPI/WCF service. On the WebAPI/WCF service a request must be made on behalf of User1 (to another webservice with Windows Authentication).
Does anyone know how I can achieve this. I first focussed on the solution with WebAPI and some Javascript code behind the button. But this approach doesn't support Windows Authentication... Or do I have to create a webpart that listens to a postback event, that is generated by the ribbon button? To still support Windows Authentication.
Any suggestions/alternatives will be welcome.