From: Noble, A. (AS01) <Ash...@ho...> - 2015-07-29 03:49:51
|
Hi Rob, Brilliant, thanks, I'll have a look. I wasn't going to get to look at it for another few weeks, so this is a nice surprise. Cheers, Ash. -----Original Message----- From: Rob Vesse [mailto:rv...@do...] Sent: Wednesday, 29 July 2015 12:53 AM To: dotNetRDF User Help and Support Subject: [dotNetRDF-Support] FW: ReadWriteSparqlConnector OAuth authentication Ashley I have resolved this issue on the default branch and a 1.0.9 release with the fix is now available on NuGet It exposes a protected virtual ApplyCustomRequestOptions() method on BaseEndpoint (and thus on both SparqlRemoteEndpoint and SparqlRemoteUpdateEndpoint) so you can now extend both those classes and override that method to add the necessary custom OAuth headers to requests Hope this allows you to resolve your issue, Rob >> >>On 24/06/2015 06:51, "Noble, Ashley (AS01)" >><Ash...@ho...> >>wrote: >> >>>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 >>> >>> >>>--------------------------------------------------------------------- >>>--- >>>- >>>- >>>---- >>>Monitor 25 network devices or servers for free with OpManager! >>>OpManager is web-based network management software that monitors >>>network devices and physical & virtual servers, alerts via email & >>>sms for fault. Monitor 25 devices for free with no restriction. >>>Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o >>>_______________________________________________ >>>dotNetRDF-Support mailing list >>>dot...@li... >>>https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support >> >> >> >> > ------------------------------------------------------------------------------ _______________________________________________ dotNetRDF-Support mailing list dot...@li... https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |