import com.vaadin.spring.annotation.ViewScope;
import eu.etaxonomy.cdm.api.application.ICdmRepository;
-import eu.etaxonomy.cdm.api.security.IPasswordResetTokenStore;
+import eu.etaxonomy.cdm.api.security.IAbstractRequestTokenStore;
import eu.etaxonomy.cdm.api.security.PasswordResetRequest;
-import eu.etaxonomy.cdm.api.service.security.PasswordResetException;
+import eu.etaxonomy.cdm.api.service.security.AccountSelfManagementException;
import eu.etaxonomy.cdm.vaadin.event.UserAccountEvent;
import eu.etaxonomy.vaadin.mvp.AbstractPresenter;
private ICdmRepository repo;
@Autowired
- private IPasswordResetTokenStore tokenStore;
+ private IAbstractRequestTokenStore tokenStore;
protected EventBus.UIEventBus uiEventBus;
}
@EventBusListenerMethod
- public void onPasswordRevoveryEvent(UserAccountEvent event) throws PasswordResetException, ExecutionException {
+ public void onPasswordRevoveryEvent(UserAccountEvent event) throws AccountSelfManagementException, ExecutionException {
if(event.getAction().equals(UserAccountEvent.UserAccountAction.RESET_PASSWORD)) {
String newPassword = getView().getPassword1Field().getValue();
if(!asyncException.isEmpty()) {
if(asyncException.get(0) instanceof MailException) {
getView().showSuccessMessage("Your password has been changed but sending the confirmation email has failed.");
- } else if(asyncException.get(0) instanceof PasswordResetException) {
+ } else if(asyncException.get(0) instanceof AccountSelfManagementException) {
getView().showErrorMessage("The password reset token has beceome invalid. Please request gain for a password reset.");
}
} else {