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

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

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

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