public function loadUserByUsername($username)
 {
     /* @var $user UserDocument  */
     $user = $this->repository->findOneByUsername($username);
     if (!$user) {
         throw new UsernameNotFoundException();
     }
     return new User($user->getUsername(), $user->getPassword(), $user->getRoles());
 }