OAuth Application (User Agent)
Register a browser / SPA OAuth application.
# 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
- 01Declare the extension with a stable ref code.
- 02Grant the scopes your microservice needs.
- 03Reference this extension in the paired microservice via
oAuth2ApplicationExternalReferenceCode.
# optional fields
| field | type | description |
|---|---|---|
name | string | Application profile name. |
description | string | Description. |
homePageURL | string | Base URL. |
privacyPolicyURL | string | Privacy policy URL. |
scopes | string[] | OAuth scopes. |
# example
my-oauth-ua:
type: oAuthApplicationUserAgent
name: My Service
scopes:
- Liferay.Headless.Admin.User.everything