Example #1
0
        public IActionResult GetCaptchaImage([FromServices] ISessionBasedCaptcha captcha)
        {
            var s = captcha.GenerateCaptchaImageFileStream(HttpContext.Session,
                                                           AppSettings.CaptchaSettings.ImageWidth,
                                                           AppSettings.CaptchaSettings.ImageHeight);

            return(s);
        }
Example #2
0
        public IActionResult GetCaptchaImage()
        {
            var s = _captcha.GenerateCaptchaImageFileStream(HttpContext.Session,
                                                            AppSettings.CaptchaSettings.ImageWidth,
                                                            AppSettings.CaptchaSettings.ImageHeight);

            return(s);
        }
Example #3
0
        public IActionResult GetCaptchaImage()
        {
            var s = _captcha.GenerateCaptchaImageFileStream(
                HttpContext.Session,
                100,
                36
                );

            return(s);
        }
Example #4
0
        public IActionResult GetCaptchaImage([FromServices] ISessionBasedCaptcha captcha)
        {
            var w = AppSettings.CaptchaSettings.ImageWidth;
            var h = AppSettings.CaptchaSettings.ImageHeight;

            // prevent crazy size
            if (w > 640)
            {
                w = 640;
            }
            if (h > 480)
            {
                h = 480;
            }

            var s = captcha.GenerateCaptchaImageFileStream(HttpContext.Session, w, h);

            return(s);
        }
Example #5
0
 public IActionResult GetCaptchaImage()
 {
     return(_captcha.GenerateCaptchaImageFileStream(HttpContext.Session, 100, 33));
 }