Package org.apache.ftpserver.usermanager

Examples of org.apache.ftpserver.usermanager.ClearTextPasswordEncryptor


            if(encryptionStrategy.equals("true") || encryptionStrategy.equals("md5")) {
                factoryBuilder.addPropertyValue("passwordEncryptor", new Md5PasswordEncryptor());
            } else if(encryptionStrategy.equals("salted")) {
                factoryBuilder.addPropertyValue("passwordEncryptor", new SaltedPasswordEncryptor());
            } else {
                factoryBuilder.addPropertyValue("passwordEncryptor", new ClearTextPasswordEncryptor());
            }
        }
       
        if (factoryClass == PropertiesUserManagerFactory.class) {
            if (StringUtils.hasText(element.getAttribute("file"))) {
View Full Code Here



    @Override
    protected UserManagerFactory createUserManagerFactory() throws FtpException {
        DbUserManagerFactory manager = (DbUserManagerFactory) super.createUserManagerFactory();
        manager.setPasswordEncryptor(new ClearTextPasswordEncryptor());
        return manager;

    }
View Full Code Here

    protected UserManagerFactory createUserManagerFactory() throws FtpException {
        PropertiesUserManagerFactory um = new PropertiesUserManagerFactory();
       
        // set to null should make the user manager volatile, e.g. not use a file
        um.setFile(null);
        um.setPasswordEncryptor(new ClearTextPasswordEncryptor());

        return um;
    }
View Full Code Here

    @Override
    protected UserManagerFactory createUserManagerFactory() throws FtpException {
        PropertiesUserManagerFactory um = new PropertiesUserManagerFactory();
        um.setFile(USERS_FILE);
        um.setPasswordEncryptor(new ClearTextPasswordEncryptor());

        return um;
    }
View Full Code Here

*
*/
public class ClearTextPasswordEncryptorTest extends TestCase {

    protected PasswordEncryptor createPasswordEncryptor() {
        return new ClearTextPasswordEncryptor();
    }
View Full Code Here

        serverFactory.addListener("default", listenerFactory.createListener());

        PropertiesUserManagerFactory umFactory = new PropertiesUserManagerFactory();
        umFactory.setAdminName("admin");
        umFactory.setPasswordEncryptor(new ClearTextPasswordEncryptor());
        umFactory.setFile(USERS_FILE);

        serverFactory.setUserManager(umFactory.createUserManager());

        return serverFactory;
View Full Code Here

  private static final String TEST_USERNAME = "demo";
  private static final String TEST_PASSWORD = "demo";

  public TestUserManager(String homeDirectory) {
    super("admin", new ClearTextPasswordEncryptor());

    testUser = new BaseUser();
    testUser.setAuthorities(Arrays.asList(new Authority[] {new ConcurrentLoginPermission(1, 1), new WritePermission()}));
    testUser.setEnabled(true);
    testUser.setHomeDirectory(homeDirectory);
View Full Code Here

        ftpServer = new FtpServer();

        // setup user management to read our users.properties and use clear text passwords
        PropertiesUserManager uman = new PropertiesUserManager();
        uman.setFile(new File("./src/test/resources/users.properties").getAbsoluteFile());
        uman.setPasswordEncryptor(new ClearTextPasswordEncryptor());
        uman.setAdminName("admin");
        uman.configure();
        ftpServer.setUserManager(uman);

        ftpServer.getListener("default").setPort(getPort());
View Full Code Here

        NativeFileSystemFactory fsf = new NativeFileSystemFactory();
        fsf.setCreateHome(true);

        PropertiesUserManagerFactory pumf = new PropertiesUserManagerFactory();
        pumf.setAdminName("admin");
        pumf.setPasswordEncryptor(new ClearTextPasswordEncryptor());
        pumf.setFile(USERS_FILE);
        UserManager userMgr = pumf.createUserManager();
       
        ListenerFactory factory = new ListenerFactory();
        factory.setPort(BaseServerTestSupport.port);
View Full Code Here

        serverFactory.addListener("default", listenerFactory.createListener());

        PropertiesUserManagerFactory umFactory = new PropertiesUserManagerFactory();
        umFactory.setAdminName("admin");
        umFactory.setPasswordEncryptor(new ClearTextPasswordEncryptor());
        umFactory.setFile(USERS_FILE);

        serverFactory.setUserManager(umFactory.createUserManager());

        return serverFactory;
View Full Code Here

TOP

Related Classes of org.apache.ftpserver.usermanager.ClearTextPasswordEncryptor

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.