|
From: Noble, A. (AS01) <Ash...@ho...> - 2015-06-24 05:52:04
|
Hi Rob, Thanks, when I get blocked by this in a few weeks I'll send a pull request (or equivalent) if that works for you. As an aside, I tried to register on the issue tracker site to leave a comment along those lines, but it didn't seem to register me. Not sure if register is working, or if it's just me. Cheers, Ash. -----Original Message----- Date: Mon, 15 Jun 2015 10:36:28 +0100 From: Rob Vesse <rv...@do...> Subject: Re: [dotNetRDF-Support] ReadWriteSparqlConnector OAuth authentication To: dotNetRDF User Help and Support <dot...@li...> Message-ID: <D1A458C9.4E42A%rv...@do...> Content-Type: text/plain; charset="utf-8" Ash Right now you can't easily do this. Assuming you can encapsulate the logic to do the OAuth authentication and get whatever tokens you need to add in the header then the best way to do this would be to extend both SparlRemoteEndpoint and SparlRemoteUpdateEndpoint. Both of these provide a protected ApplyRequestOptions(HttpWebRequest) method (which they inherit from the common base class BaseEndpoint) that you can override and modify the HttpWebRequest as needed. Unfortunately this is currently not virtual so can't be overridden so this approach won't work right now, I've filed CORE-448 [1] to track this request The other approach you could use (but would require significantly more effort) would be to create an IStorageProvider specifically for BlazeGraph so you would have full control over the HTTP requests being made but you'd have to implement a lot from scratch which I assume is what you are trying to avoid if at all possible Rob [1] http://dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=448 |