cx-composer--for=liferay

OAuth Application (User Agent)

Register a browser / SPA OAuth application.

type: oAuthApplicationUserAgent·Configuration·Liferay docs →

# description

Provisions an OAuth 2.0 user-agent (SPA / browser) client, then wires it as the auth handshake for outbound calls from Liferay to your microservice. Every microservice-style extension (`objectAction`, `objectValidationRule`, `workflowAction`, `notificationType`, `captcha`, `commercePaymentIntegration`, etc.) pairs with one of these so the browser can authenticate on behalf of the user. The alternative — `oAuthApplicationHeadlessServer` — is for server-to-server flows (Batch, Site Initializer); the two are not interchangeable. Give this extension a stable `externalReferenceCode` (the top-level yaml key), then reference it from the microservice by its ref code.

Register OAuth apps and override Configuration Admin settings.

# when to use

  • You're shipping any microservice extension (object action / validation rule / workflow action / notification / captcha).
  • A SPA hosted on Liferay needs to authenticate outbound calls.

# how to use

  1. 01Declare the extension with a stable ref code.
  2. 02Grant the scopes your microservice needs.
  3. 03Reference this extension in the paired microservice via oAuth2ApplicationExternalReferenceCode.

# optional fields

fieldtypedescription
namestringApplication profile name.
descriptionstringDescription.
homePageURLstringBase URL.
privacyPolicyURLstringPrivacy policy URL.
scopesstring[]OAuth scopes.

# example

client-extension.yaml
my-oauth-ua:
    type: oAuthApplicationUserAgent
    name: My Service
    scopes:
        - Liferay.Headless.Admin.User.everything

# more in configuration