Package org.apache.jena.atlas.web.auth

Examples of org.apache.jena.atlas.web.auth.SimpleAuthenticator


    }
   
    @Test
    public void graphstore_with_auth_03() {
        // Correct auth credentials
        DatasetAccessor accessor = DatasetAccessorFactory.createHTTP(serviceREST, new SimpleAuthenticator("allowed", "password".toCharArray()));
        Model m = accessor.getModel();
        Assert.assertTrue(m.isEmpty());
    }
View Full Code Here


    protected DatasetGraphAccessor getAccessor()
    {
        DatasetGraphAccessor accessor;
        if (this.GRAPHSTORE_LOGIN != null)
        {
            HttpAuthenticator httpAuthenticator = new SimpleAuthenticator(
                    GRAPHSTORE_LOGIN, GRAPHSTORE_PASSWORD.toCharArray());
            accessor = new DatasetGraphAccessorHTTP(GRAPHSTORE_ENDPOINT,
                    httpAuthenticator);
        } else {
            accessor = new DatasetGraphAccessorHTTP(GRAPHSTORE_ENDPOINT);
View Full Code Here

    public List<String> getAllStoredGraphs() {
        String queryString = "SELECT DISTINCT ?g WHERE { GRAPH ?g { ?s ?p ?o } }";
        QueryExecution qexec;
        if (this.SPARQL_LOGIN != null)
        {
            HttpAuthenticator httpAuthenticator = new SimpleAuthenticator(
                    SPARQL_LOGIN, SPARQL_PASSWORD.toCharArray());
            qexec = QueryExecutionFactory.sparqlService(SPARQL_ENDPOINT,
                    queryString, httpAuthenticator);
        } else {
            qexec = QueryExecutionFactory.sparqlService(SPARQL_ENDPOINT,
View Full Code Here

     *            User name
     * @param password
     *            Password
     */
    public void setAuthentication(String username, char[] password) {
        this.setAuthenticator(new SimpleAuthenticator(username, password)) ;
    }
View Full Code Here

     *
     * @param user
     * @param password
     */
    public void setBasicAuthentication(String user, char[] password) {
        this.authenticator = new SimpleAuthenticator(user, password);
    }
View Full Code Here

TOP

Related Classes of org.apache.jena.atlas.web.auth.SimpleAuthenticator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.