Examples of RemindPasswordTokenService


Examples of org.exoplatform.web.security.security.RemindPasswordTokenService

    public static class RecoveryPasswordAndUsernameActionListener extends EventListener<UIPortal> {
        @Override
        public void execute(Event<UIPortal> event) throws Exception {
            UIPortal uiPortal = event.getSource();
            RemindPasswordTokenService tokenService = uiPortal.getApplicationComponent(RemindPasswordTokenService.class);
            String tokenId = event.getRequestContext().getRequestParameter("tokenId");

            WebuiRequestContext requestContext = event.getRequestContext();
            GateInToken token = tokenService.getToken(tokenId);
            if (token == null) {
                requestContext.getUIApplication().addMessage(new ApplicationMessage("UIForgetPassword.msg.expration", null));
                requestContext.addUIComponentToUpdateByAjax(uiPortal.getParent());
                return;
            }
View Full Code Here

Examples of org.exoplatform.web.security.security.RemindPasswordTokenService

         }
        
         email = user.getEmail();

         // Create token
         RemindPasswordTokenService tokenService = uiForm.getApplicationComponent(RemindPasswordTokenService.class);
         Credentials credentials = new Credentials(user.getUserName(), "");
         tokenId = tokenService.createToken(credentials);

         String portalName = URLEncoder.encode(Util.getUIPortal().getName(), "UTF-8");

         ResourceBundle res = requestContext.getApplicationResourceBundle();
         String headerMail = "headermail";
View Full Code Here

Examples of org.exoplatform.web.security.security.RemindPasswordTokenService

         String confirmnewpassword = uiForm.getUIStringInput(CONFIRM_NEW_PASSWORD).getValue();
         WebuiRequestContext request = event.getRequestContext();
         UIApplication uiApp = request.getUIApplication();
         UIMaskWorkspace uiMaskWorkspace = uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
         OrganizationService orgService = uiForm.getApplicationComponent(OrganizationService.class);
         RemindPasswordTokenService tokenService = uiForm.getApplicationComponent(RemindPasswordTokenService.class);
        
         uiForm.reset();
         boolean setPassword = true;
        
         if (!newpassword.equals(confirmnewpassword))
         {
            uiApp.addMessage(new ApplicationMessage("UIResetPassword.msg.password-is-not-match", null));
            setPassword = false;
         }
        
         Token token = tokenService.getToken(tokenId);
         // Making sure a token exist
         if (token == null || token.isExpired())
         {
            uiApp.addMessage(new ApplicationMessage("UIForgetPassword.msg.expration", null));
            setPassword = false;
         }
        
         if (setPassword)
         {
            user_.setPassword(newpassword);
            orgService.getUserHandler().saveUser(user_, true);
            uiMaskWorkspace.setUIComponent(null);
            uiMaskWorkspace.setWindowSize(-1, -1);
            uiApp.addMessage(new ApplicationMessage("UIResetPassword.msg.change-password-successfully", null));

            tokenService.deleteToken(tokenId);
         }
         event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWorkspace);
      }
View Full Code Here

Examples of org.exoplatform.web.security.security.RemindPasswordTokenService

   {
      @Override
      public void execute(Event<UIPortal> event) throws Exception
      {
         UIPortal uiPortal = event.getSource();
         RemindPasswordTokenService tokenService = uiPortal.getApplicationComponent(RemindPasswordTokenService.class);
         String tokenId = event.getRequestContext().getRequestParameter("tokenId");

         GateInToken token = tokenService.getToken(tokenId);
         if (token == null)
         {
            WebuiRequestContext requestContext = event.getRequestContext();
            requestContext.getUIApplication().addMessage(
                     new ApplicationMessage("UIForgetPassword.msg.expration", null));
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.