Reset Password via Email Project

Primary Mentor: Wyclif Luyima.

Backup Mentor: Burke Mamlin.

Student: Harisu fanyui

Project Wiki:

Overview. This project aims at adding new feature into openmrs, ie that of which to allow users to perform self service resetting of password. This is going to do away with the bottle neck on the admins of having to carryout the password reset for other users by generating temporal password so when they log in they can reset. Or by allowing the users to provide some secret answers to secret questions that were previously provided. This new feature will allow users to request for password reset to be done via email and most importantly it should work and allow all these actions to be carried via reset webservice.
Work still to be done. Create a page for the reference app for requesting a password reset
Update the reference app pages that are used for resetting password and the controllers to display a different form …

Week Twelve

Week 12.
This week commenced and i fully worked on making sure all the hanging pull request with respect to the core have been merged and closed. I accomplished these by hastening up my speed in fixing reviews, then i created new branches called general fix where all the light works related to renaming adding exception modifying exception messages and as well writing tests.
Rest webservice. After sucessfully finishing with the core and everything merged, I went straight away to the  rest webservice module where i added 2 endpoint to handle the get with provided activation and a post with new credentials  password and activation key. this i did before consulting my mentor and  after consulting him. There was alot of other design changes such. i had to send and email message to my two mentors ie primary mentor and backup mentor. I also posted on talk here  from this talk post i received many criticism and all of them were positively to my benefits in finishing up with the rest webservi…

Week Eleven

Gsoc Week 11,
This week commenced and was interleaved with a lot of assorted activities which i under took some of which were not directly related to the my gsoc activities. This week i while still working on and fixing a the pending reviews on the pull request i made, i created off a branch from my supposed master reference which in this case is passwordreset then i added some code to receive the new password along side the activation key and creates an updates the user password if the activation key provided in the request is proven to belong to the user and is valid as the constraint provided in the method that will be invoke to get the user using the email. which are make sure that the user activation key exist and is not expired, make sure the activation key is linked to a user. After adding this method i had to also as usual write test to make sure that  the user password is updated if activation key is correct and one to make sure that the password is not updated if the activati…

Week 10

Gsoc Week 10.
This week started off with a continuation of addressing the pending reviews still on the pull request which did not get merged the following week. I went further and continued writing some tests. I also during this week had to make a presentiation of the work i've done so fare till date. This i made following some reviews of past works that i saw in past gsoc students. I started by creating a youtube channel then i went further to create a power point presentation after i got the presentation working. I had as a next challenge in making a video explaining what my presentation is talking about. Below is a front page of my presentation of the work i did. and the complete power point presentation of th work can be found here  .Aslso the link to the you tube presentaion can be found here Password Reset Via email Project -gsoc midterm presentation.

Also the link to the openmrs talk page can be found here  talk page

By the end of this week i still couldn't get the pull…

Week nine

Mid Term Evaluation
This week begin with me continuing to fix the reviews that my mentor made during the previous week. I continued the reviews until even by the end of the week the work was still hanging on the review as along the line i encountered a blocker which was about writing a test and the test was time sensitive as such creating a data set was difficult. This i had addressed in the previous week by moving these test into the userDAOTest and everything worked fine but as a result of the reviews, I had to as well migrate these test from the DAO to the service layer. This is where the algorithm which i used in the DAO for writing the test did not hold as the Logincredential which i am supposed to use was not available in the service layer. I did fixed all the other sections of the reviews but this was a blocker as it took more time debugging and actually letting me learn alot from the process. By the end of the week i had a call with my mentor and he left me with some hints an…

Week 8

Today i started by Migrating the User activation key to the login credential Object, this is as a result of the design discussion i had last week with my mentor and the reason is to abstract the activation key from being return in the User object and instead return it in the LoginCredential object. This process entails migrating the fields, methods and carrying out the mapping for the LoginCredential object. Which these i took care of. immediately i did this i noticed a failing test which is that of getUserByActivation Key this is a sure case and of course normal as the user object does not have the activation key any longer.

I added the setActivationKey method to persist the created token and hashed to form the activation Key. This came up after the refactoring of the user object by sending the activation key to the LoginCredential Object. After successfully completing the above i made a pull request and from the feedback i got just the very same day i started updating and explaining …

Week Seven

Monday beginning of week 7.
 I started this week freshly after having my pull request merged during the week that just passed, I Needed to move to new things and I went straing to the Openmrs webservice to consume the methods that i just added, During t he process of adding this method, I Tried accessing the methods which i added into core and non of them was available , i tried compiling and it failed then i realized it is not sync with the core during the build so i had to after some googling and seeking for help on the irc channel resulted to the option of me sending and email to my mentor for help in addressing the concern. I therefore got a reply with instructions on how i can do to get pass this blocker. I quickly implimented as i was told and there i went with build success.

After having a sucessful build, 
 Now i went straight away to adding the functionality i was about to add. Immediately i started i noticed I was alsmost exposing the alot of logic to the rest webservice which …