Class SimpleCaptchaImpl
java.lang.Object
com.liferay.captcha.simplecaptcha.SimpleCaptchaImpl
- All Implemented Interfaces:
com.liferay.portal.kernel.captcha.Captcha
- Direct Known Subclasses:
ReCaptchaImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CaptchaProviderprotected com.liferay.portal.kernel.util.Portalprotected com.liferay.portal.kernel.model.Releaseprotected jakarta.servlet.ServletContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheck(jakarta.portlet.PortletRequest portletRequest) voidcheck(jakarta.servlet.http.HttpServletRequest httpServletRequest) voidenforceCaptcha(jakarta.portlet.PortletRequest portletRequest) voidenforceCaptcha(jakarta.servlet.http.HttpServletRequest httpServletRequest) protected nl.captcha.backgrounds.BackgroundProducergetBackgroundProducer(CaptchaConfiguration captchaConfiguration) protected nl.captcha.gimpy.GimpyRenderergetGimpyRenderer(CaptchaConfiguration captchaConfiguration) protected intgetHeight(CaptchaConfiguration captchaConfiguration) getName()protected nl.captcha.noise.NoiseProducergetNoiseProducer(CaptchaConfiguration captchaConfiguration) protected nl.captcha.Captchaprotected Stringprotected nl.captcha.text.producer.TextProducergetTextProducer(CaptchaConfiguration captchaConfiguration) protected intgetWidth(CaptchaConfiguration captchaConfiguration) protected nl.captcha.text.renderer.WordRenderergetWordRenderer(CaptchaConfiguration captchaConfiguration) protected voidincrementCounter(jakarta.portlet.PortletRequest portletRequest) protected voidincrementCounter(jakarta.servlet.http.HttpServletRequest httpServletRequest) protected IntegerincrementCounter(Integer count) booleanisEnabled(jakarta.portlet.PortletRequest portletRequest) booleanisEnabled(jakarta.servlet.http.HttpServletRequest httpServletRequest) voidrender(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse) voidserveImage(jakarta.portlet.ResourceRequest resourceRequest, jakarta.portlet.ResourceResponse resourceResponse) voidserveImage(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse) serveImage(OutputStream outputStream) protected booleanvalidateChallenge(jakarta.portlet.PortletRequest portletRequest) protected booleanvalidateChallenge(jakarta.servlet.http.HttpServletRequest httpServletRequest)
-
Field Details
-
captchaProvider
-
portal
protected com.liferay.portal.kernel.util.Portal portal -
release
protected com.liferay.portal.kernel.model.Release release -
servletContext
protected jakarta.servlet.ServletContext servletContext
-
-
Constructor Details
-
SimpleCaptchaImpl
public SimpleCaptchaImpl()
-
-
Method Details
-
check
public void check(jakarta.servlet.http.HttpServletRequest httpServletRequest) throws com.liferay.portal.kernel.captcha.CaptchaException - Specified by:
checkin interfacecom.liferay.portal.kernel.captcha.Captcha- Throws:
com.liferay.portal.kernel.captcha.CaptchaException
-
check
public void check(jakarta.portlet.PortletRequest portletRequest) throws com.liferay.portal.kernel.captcha.CaptchaException - Specified by:
checkin interfacecom.liferay.portal.kernel.captcha.Captcha- Throws:
com.liferay.portal.kernel.captcha.CaptchaException
-
enforceCaptcha
public void enforceCaptcha(jakarta.servlet.http.HttpServletRequest httpServletRequest) - Specified by:
enforceCaptchain interfacecom.liferay.portal.kernel.captcha.Captcha
-
enforceCaptcha
public void enforceCaptcha(jakarta.portlet.PortletRequest portletRequest) - Specified by:
enforceCaptchain interfacecom.liferay.portal.kernel.captcha.Captcha
-
getName
- Specified by:
getNamein interfacecom.liferay.portal.kernel.captcha.Captcha
-
isEnabled
public boolean isEnabled(jakarta.servlet.http.HttpServletRequest httpServletRequest) - Specified by:
isEnabledin interfacecom.liferay.portal.kernel.captcha.Captcha
-
isEnabled
public boolean isEnabled(jakarta.portlet.PortletRequest portletRequest) - Specified by:
isEnabledin interfacecom.liferay.portal.kernel.captcha.Captcha
-
render
public void render(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse) throws IOException - Specified by:
renderin interfacecom.liferay.portal.kernel.captcha.Captcha- Throws:
IOException
-
serveImage
public void serveImage(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse) throws IOException - Specified by:
serveImagein interfacecom.liferay.portal.kernel.captcha.Captcha- Throws:
IOException
-
serveImage
- Specified by:
serveImagein interfacecom.liferay.portal.kernel.captcha.Captcha- Throws:
IOException
-
serveImage
public void serveImage(jakarta.portlet.ResourceRequest resourceRequest, jakarta.portlet.ResourceResponse resourceResponse) throws IOException - Specified by:
serveImagein interfacecom.liferay.portal.kernel.captcha.Captcha- Throws:
IOException
-
getBackgroundProducer
protected nl.captcha.backgrounds.BackgroundProducer getBackgroundProducer(CaptchaConfiguration captchaConfiguration) -
getGimpyRenderer
protected nl.captcha.gimpy.GimpyRenderer getGimpyRenderer(CaptchaConfiguration captchaConfiguration) -
getHeight
-
getNoiseProducer
protected nl.captcha.noise.NoiseProducer getNoiseProducer(CaptchaConfiguration captchaConfiguration) -
getSimpleCaptcha
protected nl.captcha.Captcha getSimpleCaptcha() -
getTaglibPath
-
getTextProducer
protected nl.captcha.text.producer.TextProducer getTextProducer(CaptchaConfiguration captchaConfiguration) -
getWidth
-
getWordRenderer
protected nl.captcha.text.renderer.WordRenderer getWordRenderer(CaptchaConfiguration captchaConfiguration) -
incrementCounter
protected void incrementCounter(jakarta.servlet.http.HttpServletRequest httpServletRequest) -
incrementCounter
-
incrementCounter
protected void incrementCounter(jakarta.portlet.PortletRequest portletRequest) -
validateChallenge
protected boolean validateChallenge(jakarta.servlet.http.HttpServletRequest httpServletRequest) throws com.liferay.portal.kernel.captcha.CaptchaException - Throws:
com.liferay.portal.kernel.captcha.CaptchaException
-
validateChallenge
protected boolean validateChallenge(jakarta.portlet.PortletRequest portletRequest) throws com.liferay.portal.kernel.captcha.CaptchaException - Throws:
com.liferay.portal.kernel.captcha.CaptchaException
-