use of org.orcid.jaxb.model.message.EncryptedPassword in project ORCID-Source by ORCID.
the class OrcidProfileManagerImpl method updatePasswordInformation.
@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);
}
Aggregations