Exemplo n.º 1
0
        public void GeneratePasswordReset_Fail_UserDoesNotExist()
        {
            var expected = new BadRequestObjectResult("User does not exist");
            var badEmail = "*****@*****.**";

            var actual = uam.GenerateResetPasswordToken(badEmail);

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 2
0
 public ActionResult GenerateResetLink(string emailAddress)
 {
     try
     {
         UserAccountManager _userAccountManager = new UserAccountManager(new MongoClient(MONGODB_CONNECTION_STRING));
         return(_userAccountManager.GenerateResetPasswordToken(emailAddress));
     }
     catch
     {
         return(new StatusCodeResult(StatusCodes.Status500InternalServerError));
     }
 }