Package org.apache.ftpserver.usermanager.impl

Examples of org.apache.ftpserver.usermanager.impl.PropertiesUserManager


        return (PropertiesUserManager) server.getUserManager();
    }

    public void testFile() throws Throwable {
        PropertiesUserManager um = createPropertiesUserManager("<file-user-manager file=\"" + USER_FILE_PATH + "\" />");
        assertEquals(new File("src/test/resources/users.properties"), um.getFile());
    }
View Full Code Here


        PropertiesUserManager um = createPropertiesUserManager("<file-user-manager file=\"" + USER_FILE_PATH + "\" />");
        assertEquals(new File("src/test/resources/users.properties"), um.getFile());
    }

    public void testMd5PasswordEncryptor() throws Throwable {
        PropertiesUserManager um = createPropertiesUserManager("<file-user-manager file=\"" + USER_FILE_PATH + "\" encrypt-passwords=\"md5\" />");

        assertTrue(um.getPasswordEncryptor() instanceof Md5PasswordEncryptor);
    }
View Full Code Here

        assertTrue(um.getPasswordEncryptor() instanceof Md5PasswordEncryptor);
    }
   
    public void testTruePasswordEncryptor() throws Throwable {
        PropertiesUserManager um = createPropertiesUserManager("<file-user-manager file=\"" + USER_FILE_PATH + "\" encrypt-passwords=\"true\" />");

        assertTrue(um.getPasswordEncryptor() instanceof Md5PasswordEncryptor);
    }
View Full Code Here

        assertTrue(um.getPasswordEncryptor() instanceof Md5PasswordEncryptor);
    }

    public void testNonePasswordEncryptor() throws Throwable {
        PropertiesUserManager um = createPropertiesUserManager("<file-user-manager file=\"" + USER_FILE_PATH + "\" encrypt-passwords=\"clear\" />");

        assertTrue(um.getPasswordEncryptor() instanceof ClearTextPasswordEncryptor);
    }
View Full Code Here

        assertTrue(um.getPasswordEncryptor() instanceof ClearTextPasswordEncryptor);
    }

    public void testSaltedPasswordEncryptor() throws Throwable {
        PropertiesUserManager um = createPropertiesUserManager("<file-user-manager file=\"" + USER_FILE_PATH + "\" encrypt-passwords=\"salted\" />");

        assertTrue(um.getPasswordEncryptor() instanceof SaltedPasswordEncryptor);
    }
View Full Code Here

        assertTrue(um.getPasswordEncryptor() instanceof SaltedPasswordEncryptor);
    }
   
    public void testFalsePasswordEncryptor() throws Throwable {
        PropertiesUserManager um = createPropertiesUserManager("<file-user-manager file=\"" + USER_FILE_PATH + "\" encrypt-passwords=\"false\" />");

        assertTrue(um.getPasswordEncryptor() instanceof ClearTextPasswordEncryptor);
    }
View Full Code Here

        return (PropertiesUserManager) server.getUserManager();
    }

    public void testFile() throws Throwable {
        PropertiesUserManager um = createPropertiesUserManager("<file-user-manager file=\"" + USER_FILE_PATH + "\" />");
        assertEquals(new File("src/test/resources/users.properties"), um.getFile());
    }
View Full Code Here

        PropertiesUserManager um = createPropertiesUserManager("<file-user-manager file=\"" + USER_FILE_PATH + "\" />");
        assertEquals(new File("src/test/resources/users.properties"), um.getFile());
    }

    public void testMd5PasswordEncryptor() throws Throwable {
        PropertiesUserManager um = createPropertiesUserManager("<file-user-manager file=\"" + USER_FILE_PATH + "\" encrypt-passwords=\"md5\" />");

        assertTrue(um.getPasswordEncryptor() instanceof Md5PasswordEncryptor);
    }
View Full Code Here

        assertTrue(um.getPasswordEncryptor() instanceof Md5PasswordEncryptor);
    }
   
    public void testTruePasswordEncryptor() throws Throwable {
        PropertiesUserManager um = createPropertiesUserManager("<file-user-manager file=\"" + USER_FILE_PATH + "\" encrypt-passwords=\"true\" />");

        assertTrue(um.getPasswordEncryptor() instanceof Md5PasswordEncryptor);
    }
View Full Code Here

        assertTrue(um.getPasswordEncryptor() instanceof Md5PasswordEncryptor);
    }

    public void testNonePasswordEncryptor() throws Throwable {
        PropertiesUserManager um = createPropertiesUserManager("<file-user-manager file=\"" + USER_FILE_PATH + "\" encrypt-passwords=\"clear\" />");

        assertTrue(um.getPasswordEncryptor() instanceof ClearTextPasswordEncryptor);
    }
View Full Code Here

TOP

Related Classes of org.apache.ftpserver.usermanager.impl.PropertiesUserManager

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.