Examples of UserEntity


Examples of org.vosao.entity.UserEntity

public class ForgotPasswordServlet extends AbstractServlet {

  public void doGet(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
    String key = request.getParameter("key");
    UserEntity user = getDao().getUserDao().getByKey(key);
    if (user == null || user.isDisabled()) {
      RequestDispatcher dispatcher = getServletContext()
          .getRequestDispatcher("/forgotPasswordFail.vm");
      dispatcher.forward(request,response);
    }
    else {
      user.setForgotPasswordKey(null);
      getDao().getUserDao().save(user);
      HttpSession session = request.getSession(true);
      session.setAttribute(AuthenticationFilter.USER_SESSION_ATTR,
          user.getEmail());
      response.sendRedirect("/cms/profile.vm");
    }
  }
View Full Code Here

Examples of org.vosao.entity.UserEntity

    HttpSession session = httpRequest.getSession();
        String url = httpRequest.getServletPath();
        VosaoContext ctx = VosaoContext.getInstance();
        autoLogin(httpRequest);
        String userEmail = (String)session.getAttribute(USER_SESSION_ATTR);
        UserEntity user = getDao().getUserDao().getByEmail(userEmail);
    if (user == null) {
      session.removeAttribute(USER_SESSION_ATTR);
      ctx.setUser(null);
      if (url.startsWith(CMS)) {
        String originalUrl = httpRequest.getRequestURI()
View Full Code Here

Examples of org.vosao.entity.UserEntity

    }
    String password = request.getParameter("login_password");
    if (StringUtils.isEmpty(password)) {
      return;
    }
    UserEntity user = getDao().getUserDao().getByEmail(email);
    if (user == null || user.isDisabled()) {
      return;
    }
    if (!BCrypt.checkpw(password, user.getPassword())) {
      return;
    }
    HttpSession session = request.getSession();
    session.setAttribute(USER_SESSION_ATTR, user.getEmail());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.