cx-composer--for=liferay

CAPTCHA

Replace the built-in CAPTCHA with your own (hCaptcha, reCAPTCHA, custom).

type: captcha·Microservice·Liferay docs →

# 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

  1. 01Ship three sibling extensions: a customElement for the challenge UI, a paired oAuthApplicationUserAgent, and this captcha extension.
  2. 02Point customElementExternalReferenceCode, oAuth2ApplicationExternalReferenceCode, and resourcePath at them.

# required fields

fieldtypedescription
captchaNamerequiredstringDisplay name in Instance Settings.
captchaResponseParameterNamerequiredstringRequest parameter that carries the user response.
customElementExternalReferenceCoderequiredstringRef code of the paired customElement.
oAuth2ApplicationExternalReferenceCoderequiredstringRef code of the paired oAuthApplicationUserAgent.
resourcePathrequiredstringValidation endpoint path.

# optional fields

fieldtypedescription
namestringDisplay 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:

# more in microservice