Authenticating SPARQL

Recently I'm playing a lot with SPARQL and PHP, using Virtuoso as triple store and EasyRDF as client library. The only problem was that Virtuoso pretends (of course) some kind of authentication to write data into the store (this is not entirely true, you can also permit write operations on the anonymous endpoint, but seems not to be a good idea...), and EasyRDF offers very little options to configure your SPARQL HTTP requests.

On the other hand EasyRDF permits to customize the HTTP client used as wrapper, even if PSR-7 adoption is still not a thing.

So I've managed to write my own HTTP client for EasyRDF, wrapping Guzzle and untapping the many features offered by this library (including Digest authentication, one of the provided by Virtuoso).

Here the code and here the package on Packagist.

Show Comments