Package org.apache.airavata.security

Examples of org.apache.airavata.security.UserStore


            if (priority != null) {
                authenticatorInstance.setPriority(Integer.parseInt(priority));
            }

            UserStore userStore = createUserStore(userStoreClassName);
            authenticatorInstance.setUserStore(userStore);

            return authenticatorInstance;

        } catch (InstantiationException e) {
View Full Code Here


        DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
        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

        DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
        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

        DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
        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

            if (priority != null) {
                authenticatorInstance.setPriority(Integer.parseInt(priority));
            }

            UserStore userStore = createUserStore(userStoreClassName);
            authenticatorInstance.setUserStore(userStore);

            return authenticatorInstance;

        } catch (InstantiationException e) {
View Full Code Here

TOP

Related Classes of org.apache.airavata.security.UserStore

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.