public IActionResult GuidCaptcha()
        {
            string challengeGuid = Guid.NewGuid().ToString();
            string key           = CaptchaHelper
                                   .SessionKeyPrefix + challengeGuid;

            this.HttpContext.Session.SetString(key, CaptchaHelper.MakeRandomSolution());
            return(Ok(challengeGuid));
        }
Example #2
0
        public IActionResult GuidCaptcha()
        {
            //await _emailSender.SendEmailAsync("*****@*****.**", "Confirm Email",
            //   $"Please confirm your email by clicking here: " +
            //   $"<a href='jon.jpg'>link</a>");
            //return Ok(new { s***n = "Peter" });
            string challengeGuid = Guid.NewGuid().ToString();
            string key           = CaptchaHelper
                                   .SessionKeyPrefix + challengeGuid;
            string captchaText = CaptchaHelper.MakeRandomSolution();

            this.HttpContext.Session.SetString(key, captchaText);
            return(Ok(challengeGuid));
        }