Ad Code

Sunday, July 2, 2017

Reset Password using AccountManagementService API in AEM 6.2 - Part2


Hello Everyone

In our previous User Creation using AccountManagementService API blog we have learned how to create the aem user account? Here, we will discuss about resetting the password.

To achieve the same we have to use requestPasswordReset() method of AccountManagementService API.

Explanation of requestPasswordReset() method of
AccountManagementService  API

method api.PNG
Fig- requestPasswordReset() Method
Below are the parameters of requestPasswordReset() method in detail:

  • userId: UserId, for which you are changing the password.
  • requestUrl: From this parameter, API will get the host and port. This host and port used to create confirmation page url, which is send to user in mail for request for password. Example: http://localhost:4502
  • configPath: It is a path of the node(e.g., “/content/resetPasswordProperties”) type of nt:unstructured, where only one property is needed.

a) confirmationPage: This confirmationPage link will be sent in password reset request mail, On click which, user will be redirected to the page having reset password form.
Note: This field is mandatory.


properties.PNG
Fig- config path node with its properties




Functionality of requestPasswordReset() method


Change password.jpg
Fig- Functionality of requestPasswordReset() method

Steps to follow:
  • User have to fill the Reset Password Form and submit the request.
reset password.PNG
Fig - Reset Password Form

  • This Request received by the servlet  and the servlet calls the requestPasswordReset() method of AccountManagementService API.
  • After submission of the form, "Request to change password" mail will be sent to user.
mail Password.PNG
Fig - Email for send the request to change password
    • User have to click “request to change password” link from email, and  it will redirect user to change password form.
    change.PNG
    Fig - Change Password Form
      • This "change password" form is nothing but a “newPassword” component which is having newPassword.html and POST.html .
      newPassword.html

      Note: The above html contain a hidden field having value of “ky” token.

      Post.html

      Note: Above post.html will execute on newPassword form submission as it is defined in the action of form,which includes the requestconfirmation.jsp. requestconfirmation.jsp will help to reset the password.
      • After submitting the Change Password form, A post request goes to the server. and Post.html will execute to change the password
      • After that user will get confirmation email for password change .
      password-changed.PNG
      Fig- Email for Password changed

      Let's demonstarte User Creation and Reset Password Using "AccountManagementSetvice API" here:


      If you have any query or suggestion then kindly comment or mail us at sgaem.blog02@gmail.com

      Hope it will help you guys !!
      Thanks and Happy Learning .

      16 comments:

      1. "Nice and good article.. it is very useful for me to learn and understand easily.. thanks for sharing your valuable information and time.. please keep updating.php jobs in hyderabad.
        "

        ReplyDelete
        Replies
        1. A IEEE project is an interrelated arrangement of exercises, having a positive beginning and end point and bringing about an interesting result in Engineering Colleges for a particular asset assignment working under a triple limitation - time, cost and execution. Final Year Project Domains for CSE In Engineering Colleges, final year IEEE Project Management requires the utilization of abilities and information to arrange, plan, plan, direct, control, screen, and assess a final year project for cse. The utilization of Project Management to accomplish authoritative objectives has expanded quickly and many engineering colleges have reacted with final year IEEE projects Project Centers in Chennai for CSE to help students in learning these remarkable abilities.



          Spring Framework has already made serious inroads as an integrated technology stack for building user-facing applications. Spring Framework Corporate TRaining the authors explore the idea of using Java in Big Data platforms.
          Specifically, Spring Framework provides various tasks are geared around preparing data for further analysis and visualization. Spring Training in Chennai

          Delete
      2. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Java developer learn from Java Training in Chennai. or learn thru Java EE Online Training from India . Nowadays Java has tons of job opportunities on various vertical industry.

        ReplyDelete
      3. I tried that but it is get the error message on the accountManagementService API. which is get the null exception so it is not get the mail and not able to reset the password.

        ReplyDelete
      4. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon. Digitogy

        ReplyDelete
      5. You need to download this program on a computer you do have access to and then load it onto a CD.reset windows 10 password

        ReplyDelete
      6. Amazing post! I appreciate your hard work. Thank you for sharing. I have also share some use full information.
        Drone pro review
        mosquitron reviews
        eco beat earphones review
        Coolair review
        Coolair air cooler review

        ReplyDelete
      7. Your Post gives me right path to understand that topic, thank you so much for such post. Keep going. The Photostick Mobile Review 2020

        ReplyDelete
      8. Nice post, thank for sharing this information. It's really makes me understand about that topic. GlowBowl Fresh Review

        ReplyDelete
      9. I really like the way you write the post and help us with the information. Thank you for sharing this post. Please read my blogs too.
        tikitunes review
        thephostick review
        peeps review
        creaclip review
        copper protector review

        ReplyDelete
      10. I reallpy appriciate it thanks to share with us, Instahard Pills and Trim Fast Keto

        ReplyDelete
      11. Hello such a, good piece of writing and nice urging commented at this place, I
        am truly enjoying by these.

        ReplyDelete
      12. Extraordinary bit of substance in the wake of perusing this I'm feeling overpowering to such an extent that I've increase a type of information from this page. Keep doing awesome!! Much obliged to YOU!
        Caresole Insole Review

        ReplyDelete