Package com.octo.captcha.service.image

Examples of com.octo.captcha.service.image.ImageCaptchaService


    byte[] captchaChallengeAsJpeg = null;
    ByteArrayOutputStream jpegOutputStream = new ByteArrayOutputStream();
    try {
      ApplicationContext ctx = WebApplicationContextUtils
          .getRequiredWebApplicationContext(getServletContext());
      ImageCaptchaService imageCaptchaService = (ImageCaptchaService) ctx
          .getBean(captchaServiceName);

      String captchaId = httpServletRequest.getSession().getId();
      BufferedImage challenge = imageCaptchaService
          .getImageChallengeForID(captchaId, httpServletRequest
              .getLocale());

      JPEGImageEncoder jpegEncoder = JPEGCodec
          .createJPEGEncoder(jpegOutputStream);
View Full Code Here

TOP

Related Classes of com.octo.captcha.service.image.ImageCaptchaService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.