Package net.naijatek.myalumni.modules.common.presentation.form

Examples of net.naijatek.myalumni.modules.common.presentation.form.LoginForm


  public ActionForward changePassword(ActionMapping mapping, ActionForm form,
                               HttpServletRequest request,
                               HttpServletResponse response) throws Exception {
                              
     ActionMessages messages = new ActionMessages();
     LoginForm loginForm = (LoginForm)form;    
    
     String username = getUserContainer(request).getToken().getMemberUserName();
     String currentPassword = loginForm.getMemberTempPassword();
     String newPassword = loginForm.getMemberPasswordConfirm();
    
     try{
         securityService.changePassword(username, currentPassword, newPassword);
     }
     catch(UserAccountException e){
View Full Code Here


                               HttpServletRequest request,
                               HttpServletResponse response) throws Exception {
                              
     ActionMessages messages = new ActionMessages();
        
     LoginForm loginForm = (LoginForm)form;    
     String username = loginForm.getMemberUserName();
    
     try{
         securityService.notifyPassword(username, request);
         messages.add(BaseConstants.INFO_KEY, new ActionMessage("errors.account.resetinst"));
     }
View Full Code Here

                               HttpServletRequest request,
                               HttpServletResponse response) throws Exception {
                              
     ActionMessages messages = new ActionMessages();
        
     LoginForm loginForm = (LoginForm)form;    
     String email = loginForm.getEmail();
    
     try{
         securityService.notifyUserName(email, request);
         messages.add(BaseConstants.INFO_KEY, new ActionMessage("errors.account.resetinst"));
     }
View Full Code Here

  public ActionForward updateExpiredPassword(ActionMapping mapping, ActionForm form,
                               HttpServletRequest request,
                               HttpServletResponse response) throws Exception {
                              
     ActionMessages messages = new ActionMessages();
     LoginForm loginForm = (LoginForm)form;    
     String username = loginForm.getMemberUserName();
     String password = loginForm.getMemberPassword();
     String temppassword = loginForm.getMemberTempPassword();       
    
     try{
         securityService.updateExpiredPassword(username, password, temppassword);
     }
     catch(UserAccountException e){
View Full Code Here

          int loginCounter = 0;
          String currentIP = request.getRemoteAddr();
          ActionMessages errors = new ActionMessages();
 
 
          LoginForm loginForm = (LoginForm)form;

         
          String username = loginForm.getMemberUserName();
          String password = loginForm.getMemberPassword();
         
         
          MemberVO token = null;
          LoginHistoryVO accessHistory = null;
         
          ServletContext sCtx = request.getSession().getServletContext();
          WebApplicationContext wCtx = WebApplicationContextUtils.getWebApplicationContext(sCtx);       
          MyAlumniUserContainer container = (MyAlumniUserContainer)wCtx.getBean("userContainer");    
 
 
          logger.info("Login attempt --> , [ " + username +   " ][ " + currentIP + "]");
 
 
          if (counter == null) {
              session.setAttribute("loginCounter", new Integer(loginCounter));
              session.setAttribute("loginUserCounter", username);
          } else {
              loginCounter = counter.intValue();
          }
 
          // login and store it in the session
          accessHistory = createAccessHistory(request, username)
         
         
          try {
                token = securityService.login(username, password, currentIP);
                token.setLoginSuccessfull(true);
                accessHistory.setLoginStatus(BaseConstants.LOGIN_PASS);
                accessHistory.setReasonCode(ReasonCodes.SUCCESS);
             
             
              // Prompt user to change password
              if (token.getPromptChange().equals(BaseConstants.BOOLEAN_YES)){
               
                loginForm.setMemberUserName(token.getMemberUserName());
                loginForm.setMemberPassword("");
                loginForm.setMemberTempPassword("");
                loginForm.setMemberPasswordConfirm("");               
                
                session.invalidate();
                    errors.add(BaseConstants.INFO_KEY, new ActionMessage("errors.login.resetpassword"));
                    saveMessages(request, errors);
                    accessHistory.setLoginStatus(BaseConstants.LOGIN_FAIL);
View Full Code Here

   */
  public boolean common_compareLoginPasswords(Object bean,
      ValidatorAction va, Field field, ActionMessages msgs,
      HttpServletRequest request) {

    LoginForm loginForm = (LoginForm)bean;
   
    String memberPassword = loginForm.getMemberPassword();
    String memberPasswordConfirm = loginForm.getMemberPasswordConfirm();;

    if (memberPassword != null && memberPassword.length() > 0
        && memberPasswordConfirm != null
        && memberPasswordConfirm.length() > 0) {
      if (!memberPassword.equals(memberPasswordConfirm)) {
View Full Code Here

TOP

Related Classes of net.naijatek.myalumni.modules.common.presentation.form.LoginForm

Copyright © 2018 www.massapicom. 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.