Package org.exoplatform.web.security.security

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


            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.deleteToken(uiForm.getTokenId());
            if (token == null || token.isExpired()) {
                uiApp.addMessage(new ApplicationMessage("UIForgetPassword.msg.expration", null));
                setPassword = false;
            }
View Full Code Here

    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

            }

            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

            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.deleteToken(uiForm.getTokenId());
            if (token == null || token.isExpired()) {
                uiApp.addMessage(new ApplicationMessage("UIForgetPassword.msg.expration", null));
                setPassword = false;
            }
View Full Code Here

    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

   {
      @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

    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

            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.deleteToken(uiForm.getTokenId());
            if (token == null || token.isExpired()) {
                uiApp.addMessage(new ApplicationMessage("UIForgetPassword.msg.expration", null));
                setPassword = false;
            }
View Full Code Here

            }

            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

TOP

Related Classes of org.exoplatform.web.security.security.RemindPasswordTokenService

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.