Consider the following: A logged-in user visits a publishing page in a SharePoint Online environment. The page loads data from a service running on another server using an ajax request.
In this scenario, how do I, as an author of the service, make sure the user making the request is who he says he is? Can I use any data in the request to check back with the SharePoint site that there's a valid session for the given user?
EDIT: To further elaborate: on the server side, in my custom service, I will get a request initiated on the client side of a sharepoint online site. How do I, as an author of that custom service, determine if the request comes from a valid user? I mean, anyone can fire up the javascript console in their browser and issue an ajax request to my service, pretending to be whoever.