Package org.platformlayer.ops.crypto

Examples of org.platformlayer.ops.crypto.Passwords


    super.beforeCreateItem(item);

    // TODO: This doesn't feel like the right place for this
    if (item instanceof LdapService) {
      LdapService ldapService = (LdapService) item;
      Passwords passwords = new Passwords();

      if (Secret.isNullOrEmpty(ldapService.ldapServerPassword)) {
        ldapService.ldapServerPassword = passwords.generateRandomPassword(12);
      }
    }

    if (item instanceof LdapDomain) {
      LdapDomain ldapService = (LdapDomain) item;
      Passwords passwords = new Passwords();

      if (Secret.isNullOrEmpty(ldapService.adminPassword)) {
        ldapService.adminPassword = passwords.generateRandomPassword(12);
      }
    }
  }
View Full Code Here


    super.beforeCreateItem(item);

    // TODO: This doesn't feel like the right place for this
    if (item instanceof MysqlServer) {
      MysqlServer mysqlServer = (MysqlServer) item;
      Passwords passwords = new Passwords();

      if (Secret.isNullOrEmpty(mysqlServer.rootPassword)) {
        mysqlServer.rootPassword = passwords.generateRandomPassword(12);
      }
    }
  }
View Full Code Here

          String defaultValue = defaultAnnotation.value();
          if (!Strings.isNullOrEmpty(defaultValue)) {
            value = defaultValue;
          } else {
            if (fieldType == Secret.class) {
              Passwords passwords = new Passwords();

              Secret secret = passwords.generateRandomPassword(12);
              value = secret;

            }
          }
View Full Code Here

    super.beforeCreateItem(item);

    // TODO: This doesn't feel like the right place for this
    if (item instanceof WordpressService) {
      WordpressService wordpressService = (WordpressService) item;
      Passwords passwords = new Passwords();

      if (Secret.isNullOrEmpty(wordpressService.adminPassword)) {
        wordpressService.adminPassword = passwords.generateRandomPassword(10);
      }

      if (Secret.isNullOrEmpty(wordpressService.databasePassword)) {
        wordpressService.databasePassword = passwords.generateRandomPassword(20);
      }

      if (Secret.isNullOrEmpty(wordpressService.wordpressSecretKey)) {
        wordpressService.wordpressSecretKey = passwords.generateRandomPassword(50);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.platformlayer.ops.crypto.Passwords

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.