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

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

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

            return(s);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 5
0
 public IActionResult GetCaptchaImage()
 {
     return(_captcha.GenerateCaptchaImageFileStream(HttpContext.Session, 100, 33));
 }