Examples of SimpleAuthenticator


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

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

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

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

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

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

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

            }
            return new FormsAuthenticator(logins);
        } else {
            // Do we want preemptive authentication?
            if (this.isTrue(props, PARAM_PREEMPTIVE_AUTH)) {
                return new PreemptiveBasicAuthenticator(new SimpleAuthenticator(user, password.toCharArray()));
            } else {
                // Use simple authenticator
                return new SimpleAuthenticator(user, password.toCharArray());
            }
        }
    }
View Full Code Here

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

     * @throws SQLException
     * @throws IOException
     */
    @BeforeClass
    public static void setup() throws SQLException, IOException {
        authenticator = new SimpleAuthenticator(USER, PASSWORD.toCharArray());

        realmFile = File.createTempFile("realm", ".properties");

        FileWriter writer = new FileWriter(realmFile);
        writer.write(USER + ": " + PASSWORD + ", fuseki\n");
View Full Code Here

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

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

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

    }
   
    @Test(expected = HttpException.class)
    public void graphstore_with_auth_02() {
        // Incorrect auth credentials
        DatasetAccessor accessor = DatasetAccessorFactory.createHTTP(serviceREST, new SimpleAuthenticator("allowed", "incorrect".toCharArray()));
        accessor.getModel();
    }
View Full Code Here

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

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

     * Setup for the tests by allocating a Fuseki instance to work with
     * @throws IOException
     */
    @BeforeClass
    public static void setup() throws IOException {
        authenticator = new SimpleAuthenticator(USER, PASSWORD.toCharArray());
       
        realmFile = File.createTempFile("realm", ".properties");

        FileWriter writer = new FileWriter(realmFile);
        writer.write(USER + ": " + PASSWORD + ", fuseki\n");
View Full Code Here

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

     *
     * @param user
     * @param password
     */
    public void setBasicAuthentication(String user, char[] password) {
        this.authenticator = new SimpleAuthenticator(user, password);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.