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 .

      14 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
      2. 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
      3. 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
      4. 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
      5. 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
      6. 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
      7. Nice post, thank for sharing this information. It's really makes me understand about that topic. GlowBowl Fresh Review

        ReplyDelete
      8. 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
      9. I reallpy appriciate it thanks to share with us, Instahard Pills and Trim Fast Keto

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

        ReplyDelete
      11. Writing on any topic is quite difficult thing, how are you expressing the feeling and research in words, that's matters. You did a fablous job I really like your post. I have also write some review about electronics gadget I hope peoples will like it, and it also help them to choice right product according to their uses.
        Photostick for Mobile Review
        Scratch Undo Pro Review
        Correct Back Posture Reviews
        Starscope Monocular 2021

        ReplyDelete