コード例 #1
0
 public String getMessage(String msg) throws GWTException {
   userDAO.getAllUsers();
   return "Client said: \""
       + msg
       + "\"<br>Server answered: \"Hi!"
       + SecurityContextHolder.getContext().getAuthentication().getName()
       + "\"\n";
 }
コード例 #2
0
 @Override
 public boolean login(String login, String password) {
   User user = userDAO.getUserByLogin(login);
   if (user != null) {
     String storedPass = user.getPassword();
     return storedPass.equals(password);
   } else {
     throw new AccessDeniedException("");
   }
 }