Package com.jada.util

Examples of com.jada.util.IdSecurity.fail()


      }
     
      Site site = getContentBean(request).getSiteDomain().getSite();
      IdSecurity idSecurity = new IdSecurity(site, form.getCustEmail(), true);
      if (idSecurity.isSuspened()) {
        idSecurity.fail();
        form.setCustPassword("");
          messages.add("login", new ActionMessage("content.error.login.suspended.temporary", String.valueOf(Constants.ID_SUSPEND_TIME / 1000 / 60)));
      saveMessages(request, messages);
            ActionForward actionForward = actionMapping.findForward("error");
            return actionForward;
View Full Code Here


        }
        query.setParameter("custEmail", form.getCustEmail());
       
        List<?> list = query.getResultList();
        if (list.size() == 0) {
          idSecurity.fail();
          form.setCustPassword("");
          messages.add("login", new ActionMessage("content.error.login.invalid"));
      saveMessages(request, messages);
            ActionForward actionForward = actionMapping.findForward("error");
            return actionForward;
View Full Code Here

        }
       
        Customer customer = (Customer) list.get(0);
        String password = AESEncoder.getInstance().decode(customer.getCustPassword());
        if (!password.equals(form.getCustPassword())) {
          idSecurity.fail();
          form.setCustPassword("");
          messages.add("login", new ActionMessage("content.error.login.invalid"));
      saveMessages(request, messages);
            ActionForward actionForward = actionMapping.findForward("error");
            return actionForward;
View Full Code Here

        IdSecurity idSecurity = new IdSecurity(siteDefault, form.getUserId(), true);
        if (idSecurity.isSuspened()) {
          errors.add("error", new ActionMessage("content.error.login.suspended.temporary", Constants.ID_SUSPEND_TIME / 1000 / 60));
        saveMessages(request, errors);
        form.setUserPassword("");
        idSecurity.fail();
        return actionMapping.findForward("error");
        }
         
          query = em.createQuery("from User user where userId = :userId");
      query.setParameter("userId", form.getUserId());
View Full Code Here

      List<?> list = query.getResultList();
      if (list.size() == 0) {
        errors.add("error", new ActionMessage("error.login.invalid"));
        saveMessages(request, errors);
        form.setUserPassword("");
        idSecurity.fail();
        em.getTransaction().commit();
        return actionMapping.findForward("error");
      }
      user = (User) list.get(0);
      if (user.getActive() != Constants.VALUE_YES) {
View Full Code Here

      user = (User) list.get(0);
      if (user.getActive() != Constants.VALUE_YES) {
        errors.add("error", new ActionMessage("error.login.invalid"));
        saveMessages(request, errors);
        form.setUserPassword("");
        idSecurity.fail();
        em.getTransaction().commit();
        return actionMapping.findForward("error");
      }
      String userPassword = AESEncoder.getInstance().decode(user.getUserPassword());
      if (!userPassword.equals(form.getUserPassword())) {
View Full Code Here

      String userPassword = AESEncoder.getInstance().decode(user.getUserPassword());
      if (!userPassword.equals(form.getUserPassword())) {
        errors.add("error", new ActionMessage("error.login.invalid"));
        saveMessages(request, errors);
        form.setUserPassword("");
        idSecurity.fail();
        em.getTransaction().commit();
        return actionMapping.findForward("error");
      }
      Site site = null;
      if (!Format.isNullOrEmpty(user.getUserLastVisitSiteId())) {
View Full Code Here

            return actionForward;
      }
     
      IdSecurity idSecurity = new IdSecurity(site, form.getCustEmail(), true);
      if (idSecurity.isSuspened()) {
        idSecurity.fail();
          form.setCustPassword("");
        this.initCartInfo(form, site, shoppingCart, request, messages);
          messages.add("login", new ActionMessage("content.error.login.suspended.temporary", String.valueOf(Constants.ID_SUSPEND_TIME / 1000 / 60)));
      saveMessages(request, messages);
            ActionForward actionForward = actionMapping.findForward("error");
View Full Code Here

        query.setParameter("custEmail", form.getCustEmail());
        query.setParameter("custPassword", AESEncoder.getInstance().encode(form.getCustPassword()));
       
        List<?> list = query.getResultList();
        if (list.size() == 0) {
          idSecurity.fail();
          form.setCustPassword("");
        this.initCartInfo(form, site, shoppingCart, request, messages);
          messages.add("login", new ActionMessage("content.error.login.invalid"));
      saveMessages(request, messages);
            ActionForward actionForward = actionMapping.findForward("error");
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.