/** {@inheritDoc} */
 @Override
 public UserDetails loadUserByUsername(String username) {
   User user = (User) userDao.getByUsername(username);
   if (user == null) {
     throw new UsernameNotFoundException("User not found: " + username);
   }
   return user;
 }
 /** {@inheritDoc} */
 @Override
 public User getCurrentUser() {
   return (User) userDao.getByUsername(getCurrentUserUsername());
 }