/** * Create an instance of {@link EncryptedPassword } * */ public EncryptedPassword createEncryptedPassword() { return new EncryptedPassword(); }
@Override public int hashCode() { int result = encryptedPassword != null ? encryptedPassword.hashCode() : 0; result = 31 * result + (securityQuestionId != null ? securityQuestionId.hashCode() : 0); result = 31 * result + (encryptedSecurityAnswer != null ? encryptedSecurityAnswer.hashCode() : 0); result = 31 * result + (encryptedVerificationCode != null ? encryptedVerificationCode.hashCode() : 0); return result; } }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof SecurityDetails)) { return false; } SecurityDetails that = (SecurityDetails) o; if (encryptedPassword != null ? !encryptedPassword.equals(that.encryptedPassword) : that.encryptedPassword != null) { return false; } if (encryptedSecurityAnswer != null ? !encryptedSecurityAnswer.equals(that.encryptedSecurityAnswer) : that.encryptedSecurityAnswer != null) { return false; } if (encryptedVerificationCode != null ? !encryptedVerificationCode.equals(that.encryptedVerificationCode) : that.encryptedVerificationCode != null) { return false; } if (securityQuestionId != null ? !securityQuestionId.equals(that.securityQuestionId) : that.securityQuestionId != null) { return false; } return true; }
SecurityDetails securityDetails = orcidInternal.getSecurityDetails(); if (securityDetails != null) { String encryptedPassword = securityDetails.getEncryptedPassword() != null ? securityDetails.getEncryptedPassword().getContent() : null; profileEntity.setEncryptedPassword(encryptedPassword); profileEntity.setSecurityQuestion(securityDetails.getSecurityQuestionId() == null ? null : securityQuestionDao.find((int) securityDetails
@Override @Transactional public void updatePasswordInformation(OrcidProfile updatedOrcidProfile) { String orcid = updatedOrcidProfile.getOrcidIdentifier().getPath(); String hashedPassword = hash(updatedOrcidProfile.getPassword()); profileDao.updateEncryptedPassword(orcid, hashedPassword); OrcidProfile cachedProfile = orcidProfileCacheManager.retrieve(orcid); if (cachedProfile != null) { profileDao.flush(); SecurityDetails securityDetails = initSecurityDetails(cachedProfile); securityDetails.setEncryptedPassword(new EncryptedPassword(hashedPassword)); cachedProfile.setPassword(hashedPassword); orcidProfileCacheManager.put(cachedProfile); } updateSecurityQuestionInformation(updatedOrcidProfile); }
securityDetails.setEncryptedPassword(profileEntity.getEncryptedPassword() != null ? new EncryptedPassword(profileEntity.getEncryptedPassword()) : null); securityDetails.setSecurityQuestionId(profileEntity.getSecurityQuestion() == null ? null : new SecurityQuestionId(profileEntity.getSecurityQuestion().getId())); securityDetails.setEncryptedSecurityAnswer(profileEntity.getEncryptedSecurityAnswer() != null ? new EncryptedSecurityAnswer(profileEntity