Examples of PasswordData


Examples of net.webpasswordsafe.common.model.PasswordData

            {
                User loggedInUser = loginService.getLogin();
                Password password = new Password();
                password.setName(Utils.safeString(passwordMap.get("title")));
                password.setUsername(Utils.safeString(passwordMap.get("username")));
                PasswordData passwordDataItem = new PasswordData();
                passwordDataItem.setPassword(Utils.safeString(passwordMap.get("password")));
                password.addPasswordData(passwordDataItem);
                password.setNotes(Utils.safeString(passwordMap.get("notes")));
                password.setMaxHistory(-1);
                String active = Utils.safeString(passwordMap.get("active")).toLowerCase();
                password.setActive(active.equals("") || active.equals("true") || active.equals("yes") || active.equals("y"));
View Full Code Here

Examples of net.webpasswordsafe.common.model.PasswordData

                    if (null != password)
                    {
                        Password updatePassword = password.cloneCopy();
                        updatePassword.setName(Utils.safeString(passwordMap.get("title")));
                        updatePassword.setUsername(Utils.safeString(passwordMap.get("username")));
                        PasswordData passwordDataItem = new PasswordData();
                        passwordDataItem.setPassword(Utils.safeString(passwordMap.get("password")));
                        updatePassword.addPasswordData(passwordDataItem);
                        updatePassword.setNotes(Utils.safeString(passwordMap.get("notes")));
                        String active = Utils.safeString(passwordMap.get("active")).toLowerCase();
                        updatePassword.setActive(active.equals("") || active.equals("true") || active.equals("yes") || active.equals("y"));
                        updatePassword.addTagsAsString(Utils.safeString(passwordMap.get("tags")));
View Full Code Here

Examples of net.webpasswordsafe.common.model.PasswordData

                        password.addTag(tag);
                    }
                }
               
                // update password data, push others back in history if applicable
                PasswordData updatePasswordData = updatePassword.getCurrentPasswordData();
                String updatePasswordVal = updatePasswordData.getPassword();
                // if user entered a password value and its not the same as the current one...
                if (!"".equals(updatePasswordVal))
                {
                    String currentPasswordVal = encryptor.decrypt(password.getCurrentPasswordData().getPassword());
                    if (!updatePasswordVal.equals(currentPasswordVal))
                    {
                        updatePasswordData.setUserCreated(loggedInUser);
                        updatePasswordData.setDateCreated(now);
                        updatePasswordData.setPassword(encryptor.encrypt(updatePasswordVal));
                        password.addPasswordData(updatePasswordData);
                    }
                }
                // trim history if not infinite
                password.pruneDataHistory();
View Full Code Here

Examples of net.webpasswordsafe.common.model.PasswordData

        if (null != password)
        {
            decryptedPasswordDataList = new ArrayList<PasswordData>(password.getPasswordData().size());
            for (PasswordData passwordData : password.getPasswordData())
            {
                decryptedPasswordDataList.add(new PasswordData(encryptor.decrypt(passwordData.getPassword()),
                        passwordData.getDateCreated(), passwordData.getUserCreated()));
            }
            createPasswordAccessAuditEntry(password, loggedInUser);
            auditLogger.log(now, loggedInUser.getUsername(), ServerSessionUtil.getIP(), action, passwordTarget(password), true, "");
        }
View Full Code Here

Examples of net.webpasswordsafe.common.model.PasswordData

        if (validateFields())
        {
            password.setName(Utils.safeString(nameTextBox.getValue()));
            password.setUsername(Utils.safeString(usernameTextBox.getValue()));
            password.removePasswordData();
            PasswordData passwordDataItem = new PasswordData();
            passwordDataItem.setPassword(Utils.safeString(passwordTextBox.getValue()));
            password.addPasswordData(passwordDataItem);
            password.addTagsAsString(Utils.safeString(tagsComboBox.getRawValue()));
            password.setNotes(Utils.safeString(notesTextArea.getValue()));
            password.setMaxHistory(Utils.safeInt(String.valueOf(maxHistoryTextBox.getValue())));
            password.setMaxHistory((password.getMaxHistory() < -1) ? -1 : password.getMaxHistory());
View Full Code Here

Examples of org.jclouds.ec2.domain.PasswordData

   protected final DateService dateService = new SimpleDateFormatDateService();

   public void test() {
      InputStream is = getClass().getResourceAsStream("/get_passworddata.xml");

      PasswordData expected = expected();

      GetPasswordDataResponseHandler handler = injector.getInstance(GetPasswordDataResponseHandler.class);
      PasswordData result = factory.create(handler).parse(is);

      assertEquals(result.toString(), expected.toString());
  }
View Full Code Here

Examples of org.jclouds.ec2.domain.PasswordData

   @Test
   public void testApply() throws Exception {
      WindowsLoginCredentialsFromEncryptedData f = new WindowsLoginCredentialsFromEncryptedData(new JCECrypto());

      PasswordData passwordData = PasswordData.builder()
                                              .instanceId("i-2574e22a")
                                              .timestamp(dateService.iso8601DateParse("2012-07-30T07:27:23.000+0000"))
                                              .passwordData(ENCRYPTED_PASSWORD).build();

      LoginCredentials credentials = f.apply(new PasswordDataAndPrivateKey(passwordData, PRIVATE_KEY));
View Full Code Here

Examples of org.jclouds.ec2.domain.PasswordData

      // password, and returns true if there is password data available.
      Predicate<String> passwordReady = new Predicate<String>() {
         @Override
         public boolean apply(@Nullable String s) {
            if (Strings.isNullOrEmpty(s)) return false;
            PasswordData data = ec2Client.getWindowsServices().getPasswordDataInRegion(region, s);
            if (data == null) return false;
            return !Strings.isNullOrEmpty(data.getPasswordData());
         }
      };

      // Now wait, using RetryablePredicate
      final int maxWait = 600;
View Full Code Here

Examples of org.jclouds.ec2.domain.PasswordData

   protected final DateService dateService = new SimpleDateFormatDateService();

   public void test() {
      InputStream is = getClass().getResourceAsStream("/get_passworddata.xml");

      PasswordData expected = expected();

      GetPasswordDataResponseHandler handler = injector.getInstance(GetPasswordDataResponseHandler.class);
      PasswordData result = factory.create(handler).parse(is);

      assertEquals(result.toString(), expected.toString());
  }
View Full Code Here

Examples of org.jclouds.ec2.domain.PasswordData

   @Test
   public void testApply() throws Exception {
      WindowsLoginCredentialsFromEncryptedData f = new WindowsLoginCredentialsFromEncryptedData(new JCECrypto());

      PasswordData passwordData = PasswordData.builder()
                                              .instanceId("i-2574e22a")
                                              .timestamp(dateService.iso8601DateParse("2012-07-30T07:27:23.000+0000"))
                                              .passwordData(ENCRYPTED_PASSWORD).build();

      LoginCredentials credentials = f.apply(new PasswordDataAndPrivateKey(passwordData, PRIVATE_KEY));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.