*/
@Override
public void onApplicationEvent(AuthenticationSuccessEvent event) {
try {
ZEUserDetails details = (ZEUserDetails) event.getAuthentication().getPrincipal();
UserLogged userLoggedEvent = new UserLogged(details.getUser());
eventsDispatcher.publishEvent(userLoggedEvent);
} catch (Exception e) {
log.error("Cannot publish UserLogged event", e);
}
}