Package org.apache.lenya.ac.file

Examples of org.apache.lenya.ac.file.FileUserManager


        String password = "daisy";
        FileUser user = createAndSaveUser("mickey", "Mickey Mouse", "mickey@mouse.com", password);
        assertTrue(user.authenticate(password));

        File configDir = getAccreditablesDirectory();
        FileUserManager manager = null;
        manager = FileUserManager.instance(configDir);
        assertNotNull(manager);

        User lenya = manager.getUser("lenya");
        assertNotNull(lenya);
        assertTrue(lenya.authenticate("levi"));
    }
View Full Code Here


     * @return an <code>LDAPUser</code>
     * @throws AccessControlException of the loading fails
     */
    final public LDAPUser loadUser(String userName)
        throws AccessControlException {
        FileUserManager manager = FileUserManager.instance(getAccreditablesDirectory());

        return (LDAPUser)manager.getUser(userName);
    }
View Full Code Here

     * @throws AccessControlException of the loading fails
     */
    final public LDAPUser loadUser(String userName)
        throws AccessControlException {
        UserType[] userTypes = { FileAccreditableManager.getDefaultUserType() };
        FileUserManager manager = FileUserManager.instance(getAccreditablesDirectory(), userTypes);

        return (LDAPUser)manager.getUser(userName);
    }
View Full Code Here

     * @throws AccessControlException DOCUMENT ME!
     */
    final public void testInstance() throws AccessControlException {
        File configDir = getAccreditablesDirectory();
        UserType[] userTypes = { FileAccreditableManager.getDefaultUserType() };
        FileUserManager manager = FileUserManager.instance(configDir, userTypes);
        assertNotNull(manager);
    }
View Full Code Here

        adminGroup.add(user);
        user.save();

        FileGroupManager groupManager = null;
        UserType[] userTypes = { FileAccreditableManager.getDefaultUserType() };
        FileUserManager userManager = FileUserManager.instance(configDir, userTypes);
        assertNotNull(userManager);

        groupManager = FileGroupManager.instance(configDir);
        assertNotNull(groupManager);
View Full Code Here

                userName,
                "Alice in Wonderland",
                "alice@wonderland.com",
                "secret");
        UserType[] userTypes = { FileAccreditableManager.getDefaultUserType() };
        FileUserManager manager = FileUserManager.instance(configDir, userTypes);
        assertNotNull(manager);
        manager.add(user);

        User otherUser = manager.getUser(userName);
        assertEquals(user, otherUser);
        assertEquals(user.getDescription(), otherUser.getDescription());
        assertEquals(user.getEmail(), otherUser.getEmail());
        assertEquals(user.getEncryptedPassword(), ((AbstractUser) otherUser).getEncryptedPassword());
    }
View Full Code Here

TOP

Related Classes of org.apache.lenya.ac.file.FileUserManager

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.