SmartDataAnalytics / jena-sparql-api

A collection of Jena-extensions for hiding SPARQL-complexity from the application layer
Other
57 stars 14 forks source link

Support authentication #29

Open mgns opened 5 years ago

mgns commented 5 years ago

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?

Aklakan commented 3 years ago

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.

jimkont commented 3 years ago

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