Important
You are browsing upcoming documentation for version 7.1 of OroCommerce, scheduled for release in 2027. Read the documentation for the latest LTS version to get up-to-date information.
See our Release Process documentation for more information on the currently supported and upcoming releases.
OroHeadlessApplicationBundle
Important
OroHeadlessApplicationBundle is available in the Enterprise edition only.
OroHeadlessApplicationBundle is a bundle that registers external applications that work with the API of an Oro application. A headless storefront is an example of such an application. Each registered application is a headless application. Each headless application has its own OAuth2 client, and the bundle creates and manages this client.
The bundle is part of the oro/headless package. It uses
OroOAuth2ServerBundle for the OAuth2 clients.
The bundle adds a back-office page to manage headless applications. The bundle does not include an application type
of its own. Other bundles register the types and add fields, page blocks, and system configuration settings for them.
For example, OroHeadlessStorefrontBundle adds the
general_storefront type for an external storefront. It also restricts the storefront requests of an application
to its website and adapts the OroCommerce checkout for Session Transfer. For a step-by-step example of a new storefront
type, see
Create a New Headless Application Type.
OroStorefrontEmbeddedBundle does not depend on headless applications. It shows OroCommerce storefront pages in an external application, for example, in a browser session that a headless application opens through Session Transfer.
Data Model
The Oro\Bundle\HeadlessApplicationBundle\Entity\HeadlessApplication entity stores a headless application in the
oro_headless_application table. The entity is extendable and is owned by an organization. It has the following
fields:
name— The name of the application. It is unique within the organization.type— The name of the application type.oAuth2Client— A one-to-one relation to anOro\Bundle\OAuth2ServerBundle\Entity\Cliententity.
Deleting the application deletes its OAuth2 client, and deleting the client deletes the application.
OAuth2 Client
On the first save of an application, the bundle sets up its OAuth2 client:
The client gets the name and the organization of the application.
The client uses only the Authorization Code grant.
The client is a storefront or a back-office client, as the application type selects. For details, see Register an Application Type.
OroOAuth2ServerBundle generates the client ID and the client secret.
On later saves, the bundle copies only the new application name to the client.
The OAuth2 client of a headless application is managed only through the application. For this reason, the bundle
denies the EDIT and DELETE permissions for this client. On the oro_oauth2_view and
oro_oauth2_frontend_view routes of such a client, the bundle adds a warning flash message.
Feature Toggle
The headless_applications feature covers the following resources of the bundle:
Routes —
oro_headless_application_index,oro_headless_application_view,oro_headless_application_create, andoro_headless_application_updateDatagrid —
oro-headless-application-gridEntity —
Oro\Bundle\HeadlessApplicationBundle\Entity\HeadlessApplicationNavigation item —
application_menu.system_tab.integrations_submenu.oro_headless_applications
The oro_headless_application.feature.voter.headless_application_types feature voter disables the feature while no
application type is registered. As a result, these resources are not available until another bundle registers a type.
For more information, see OroFeatureToggleBundle.