Package org.apache.airavata.security

Examples of org.apache.airavata.security.UserStore.configure()


        Document doc = dBuilder.parse(this.getClass().getClassLoader().getResourceAsStream("ldap-authenticator.xml"));
        doc.getDocumentElement().normalize();

        NodeList configurations = doc.getElementsByTagName("specificConfigurations");
        UserStore userStore = new LDAPUserStore();
        userStore.configure(configurations.item(0));

        assertTrue(userStore.authenticate("amilaj", "secret"));
    }

View Full Code Here


        Document doc = dBuilder.parse(this.getClass().getClassLoader().getResourceAsStream("jdbc-authenticator.xml"));
        doc.getDocumentElement().normalize();

        NodeList configurations = doc.getElementsByTagName("specificConfigurations");
        UserStore userStore = new JDBCUserStore();
        userStore.configure(configurations.item(0));

        Assert.assertTrue(userStore.authenticate("amilaj", "secret"));
        Assert.assertFalse(userStore.authenticate("amilaj", "1secret"));
        Assert.assertFalse(userStore.authenticate("lahiru", "1234"));
View Full Code Here

        Document doc = dBuilder.parse(this.getClass().getClassLoader().getResourceAsStream("jdbc-authenticator.xml"));
        doc.getDocumentElement().normalize();

        NodeList configurations = doc.getElementsByTagName("specificConfigurations");
        UserStore userStore = new JDBCUserStore();
        userStore.configure(configurations.item(0));

        Assert.assertTrue(userStore.authenticate("amilaj", "secret"));
        Assert.assertFalse(userStore.authenticate("amilaj", "1secret"));
        Assert.assertFalse(userStore.authenticate("lahiru", "1234"));
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.