On 05/08/14 20:26, Rodrigo Antonialli wrote:
Hi,

There's some time now I don't work with Jena, and I have a doubt:

How do I access a secured fuseki endpoint with jena?

For an open endpoint, I'm using DatasetAccessorFactory.createHTTP method to
get a DatasetAccessor to get and put models and also using
QueryExecutionFactory to query a model or a sparqlService.

My fuseki instance is running on port 3030 and I've just set a proxy in my
apache server to redirect requests from mydomain/fuseki/ to mydomain:3030/
... within this proxy, I've set a digest authentication.

The proxy works fine. When I get any URL in Fuseki (except the control
panel and the /$/datasets post), it requires authentication. When
credencials are provided, the server answers the right way.

Is there a way now to access this fuseki instance (mydomain/fuseki) using
Jena???

Hi there,

Methods with an HttpAuthenticator argument are what you are looking for.

Jena uses Apache HttpClient for much of the HTTp access internally and HttpAuthenticator is the way to pass policy+details to that code.

There are various implementations of HttpAuthenticator in the code base including SimpleAuthenticator for basic and digest authentication.

        Andy


Thanks!

Rodrigo C. Antonialli
======================================
Rio Claro - SP - Brasil
LinkedIn: http://www.linkedin.com/in/rcantonialli
Contato:  [email protected]
               Skype: rc_antonialli


Reply via email to