jena-sparql-api icon indicating copy to clipboard operation
jena-sparql-api copied to clipboard

Support authentication

Open mgns opened this issue 5 years ago • 2 comments

Some SPARQL endpoints demand authorization. Would it make sense to create a decorator that handles various authentication methods, e.g. API Key, Bearer Token, Basic Auth, OAuth 1.0 / 2.0?

mgns avatar Oct 02 '19 14:10 mgns

QueryExecutionFactoryHttp supports passing a commons HttpClient instance which can be configured to inject the necessary oauth headers into http requests. There was a recent request to add this feature in order to allow RDFUnit connect to a SPARQL endpoint with oauth access.

I am not sure whether it is necessary to add authentication code to this project or whether it is sufficient to just support operating on top of some other mechanism as it has been done with HttpClient.

Aklakan avatar Jun 21 '21 19:06 Aklakan

Adding a simple constructor that support Basic Auth should cover most of the authentication use cases imho, the rest could pass a correctly configured HttpClient

jimkont avatar Jun 23 '21 09:06 jimkont