public String encode(PasswordCredential credential, String clearTextPassword) throws SecurityException { if ( usesOldEncodingAlgorithm(credential.isEnabled(), credential.getLastAuthenticationDate(), credential.getPreviousAuthenticationDate())) { return oldEncoder.encode(credential.getUserName(), clearTextPassword); } else { // 2013-07-25: DST: while debugging this problem, it appears credential.getNewPassword is always null, // while clearTextPassword had the correct password to encode with new algorithm // see: https://issues.apache.org/jira/browse/JS2-1286 return encode(credential.getUserName(), clearTextPassword); // credential.getNewPassword()); } }
site.getRealm(), url.getHost(), new UsernamePasswordCredentials(credential.getUserName(), SSOUtils.unscramble(credential.getPassword())) ); siteURL.append("?").append(site.getFormUserField()).append("=").append(credential.getUserName()).append("&").append(site.getFormPwdField()).append("=").append(SSOUtils.unscramble(credential.getPassword()));
public AuthenticatedUser authenticate(String userName, String password) throws SecurityException { PasswordCredential credential = upcm.getAuthenticatedPasswordCredential(userName, password); User user = credential.getUser(); if (user == null) { user = um.getUser(credential.getUserName()); } return new AuthenticatedUserImpl(user, new UserCredentialImpl(credential)); } }
public void recodeIfNeeded(PasswordCredential credential, String clearTextPassword) throws SecurityException { if ( usesOldEncodingAlgorithm(credential.isEnabled(), credential.getLastAuthenticationDate(), credential.getPreviousAuthenticationDate())) { credential.setPassword(encode(credential.getUserName(), clearTextPassword), true); } }
userDn = getUserDn(credential.getUserName()); if (oldPassword != null) authenticateUser(credential.getUserName(), userDn, oldPassword); authenticated = true; ldapPassword = cpe.encode(credential.getUserName(), newPassword != null ? newPassword : password); setPassword(credential.getUserName(), userDn, oldPassword, ldapPassword, oldPassword != null ? changePasswordByUser : false);
String ssoUserName = credentials.getUserName(); String ssoPWD = credentials.getPassword(); ds.setUsername(ssoUserName);
validatingOldPassword = encoder.encode(credential.getUserName(), validatingOldPassword); if (encoder != null) newPassword = encoder.encode(credential.getUserName(), newPassword); if (encoder != null && !credential.isEncoded()) newPassword = encoder.encode(credential.getUserName(), newPassword);
newPrincipal.setCredential(pw.getUserName(), pwdChars, pw.getExpirationDate(), pw.isEnabled(), pw.isExpired(), pw.isUpdateRequired()); return;