Package org.syncany.config.to

Examples of org.syncany.config.to.UserTO


  }
 
  public static PortTO createPortTO(int port) {
    String accessToken = CipherUtil.createRandomAlphabeticString(20);
   
    UserTO cliUser = new UserTO();
    cliUser.setUsername("CLI");
    cliUser.setPassword(accessToken);
   
    PortTO portTO = new PortTO();
    portTO.setPort(port);
    portTO.setUser(cliUser);
    return portTO;
View Full Code Here


      return createAndWriteDaemonConfig(daemonConfigFile, Arrays.asList(new FolderTO[] { defaultFolderTO }));
  }

    public static DaemonConfigTO createAndWriteDaemonConfig(File configFile, List<FolderTO> folders) throws ConfigException {
      UserTO defaultUserTO = new UserTO();
    defaultUserTO.setUsername(UserConfig.USER_ADMIN);
    defaultUserTO.setPassword(CipherUtil.createRandomAlphabeticString(12));

    ArrayList<UserTO> users = new ArrayList<>();
    users.add(defaultUserTO);

    DaemonConfigTO defaultDaemonConfigTO = new DaemonConfigTO();
View Full Code Here

      // Add user and password for access from the CLI
      if (daemonConfig.getPortTO() == null && portTO == null) {
        // Access info has not been created yet, generate new user-password pair
        String accessToken = CipherUtil.createRandomAlphabeticString(20);
       
        UserTO cliUser = new UserTO();
        cliUser.setUsername(UserConfig.USER_CLI);
        cliUser.setPassword(accessToken);
       
        portTO = new PortTO();
       
        portTO.setPort(daemonConfig.getWebServer().getBindPort());
        portTO.setUser(cliUser);
View Full Code Here

TOP

Related Classes of org.syncany.config.to.UserTO

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.