CAPTCHA
Replace the built-in CAPTCHA with your own (hCaptcha, reCAPTCHA, custom).
# description
Ships a full CAPTCHA implementation: a Custom Element renders the challenge, an OAuth-authenticated service validates the response. Liferay swaps in your CAPTCHA wherever the platform prompts for one.
Externalize business logic — actions, validation, workflow, notifications.
# when to use
- →You want hCaptcha / reCAPTCHA / Turnstile / a custom challenge instead of Liferay's built-in.
- →Enterprise / compliance requires a specific CAPTCHA vendor.
# how to use
- 01Ship three sibling extensions: a
customElementfor the challenge UI, a pairedoAuthApplicationUserAgent, and thiscaptchaextension. - 02Point
customElementExternalReferenceCode,oAuth2ApplicationExternalReferenceCode, andresourcePathat them.
# required fields
| field | type | description |
|---|---|---|
captchaNamerequired | string | Display name in Instance Settings. |
captchaResponseParameterNamerequired | string | Request parameter that carries the user response. |
customElementExternalReferenceCoderequired | string | Ref code of the paired customElement. |
oAuth2ApplicationExternalReferenceCoderequired | string | Ref code of the paired oAuthApplicationUserAgent. |
resourcePathrequired | string | Validation endpoint path. |
# optional fields
| field | type | description |
|---|---|---|
name | string | Display name. |
# example
client-extension.yaml
my-captcha:
type: captcha
captchaName: hCaptcha
captchaResponseParameterName: h-captcha-response
customElementExternalReferenceCode: my-captcha-widget
oAuth2ApplicationExternalReferenceCode: my-captcha-oauth
resourcePath: /captcha/verify# related types
Usually shipped alongside CAPTCHA: