I try to get the preview of Documents working when documents are hosted in SP2010 and crawled by SP2013.
To render a document, the index creates a link that returns an iframe that contains the preview of the document. this works perfectly because SP2013 and OWA2013 use oAuth to authorize the request - this happens in the background. In other words: Your browser generates the oAuth token, hands this over to the OWA server. The OWA server than hands this token to SP2013 and can fetch the document "on behalf of".
SharePoint 2010 does not support oAuth.
Is it possible to create a custom webservice/http handler that gets the request from the OWA? This custom module would get the oAuth token, would check back back at the SP2013 what user is behind the token. With the login of the user it then resolves the user login and SP2010 can then decide whether the user is allowed to see the document or not.
Theoretically this should work - any arguments why it shouldn't?
Update 1 - 11/21/2013 What I got so far:
When I open the URL http://owa2013.demo.com/op/view.aspx?src=[Encoded Url of my handler + document to open as query Parameter] OWA opens my handler and passes the query string parameter containing the url of my document sitting in the sp2010 host. So far so good.
Now I need to create:
a new wopiframe3.aspx that creates the fancy oAuth token and post this along to OWA - this is because I cant convince the original wopiframe to call a url with a protocol, it only opens relative urls. My hope is that this token then will be relayed to my handler.
After this I need a TokenHandler that runs in .net 3.5 so I can host my new handler in SP2010 - with this tokenhandler I can then get the users login from SP2013 and verify that he can access the document in SP2010.
More complicated than I thought. Is it really that complicated?