I have a custom c# windows forms application. How can I authenticate to Office 365 SharePoint Online in order to issue HttpWebRequest to customer web-sites using ACS tokens.
User will provide username and password and based on that I want to generate an ACS token that will allow the application to make requests on customer web-site. Also I want to be able to regenerate the token if it's expired, without reprompting username and password if possible.
if this will be a provider hosted app, then no problem is easy to do it but how can I achieve this from a custom application which is not a SharePoint app?