jena-sparql-api
jena-sparql-api copied to clipboard
Support authentication
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?
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.
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