Magento_Integration module
This module enables third-party services to call the Web API by using access tokens. It provides an admin UI that enables manual creation of integrations. Extensions can also provide a configuration file so that an integration can be automatically pre-configured. The module also contains the data model for request and access token management.
Installation
This module is one of the base modules. You cannot disable or uninstall this module.
This module is dependent on the following modules:
Magento_StoreMagento_UserMagento_Security
This module creates the following tables in the database:
oauth_consumeroauth_tokenoauth_nonceintegrationoauth_token_request_log
For information about a module installation, see Enable or disable modules.
Extensibility
Extension developers can interact with the Magento_Integration module. For more information about the extension mechanism, see Plugins.
The dependency injection mechanism enables you to override the functionality of the Magento_Integration module.
Events
The module dispatches the following events:
Model
customer_loginevent in the\Magento\Integration\Model\CustomerTokenService::createCustomerAccessTokenmethod. Parameters:customeris an object (\Magento\Customer\Api\Data\CustomerInterfaceclass)
For information about an event, see Events and observers.
Layouts
This module introduces the following layout handles in the view/adminhtml/layout directory:
adminhtml_integration_editadminhtml_integration_gridadminhtml_integration_grid_blockadminhtml_integration_indexadminhtml_integration_newadminhtml_integration_permissionsdialogadminhtml_integration_tokensdialogadminhtml_integration_tokensexchange
For more information about a layout, see the Layout documentation.
Public APIs
-
\Magento\Integration\Api\AdminTokenServiceInterface:- create access token for admin given the admin credentials
- revoke token by admin ID
-
\Magento\Integration\Api\AuthorizationServiceInterface:- grant permissions to user to access the specified resources
- grant permissions to the user to access all resources available in the system
- remove role and associated permissions for the specified integration
-
\Magento\Integration\Api\CustomerTokenServiceInterface:- create access token for admin given the customer credentials
- revoke token by customer ID
-
\Magento\Integration\Api\IntegrationServiceInterface:- create a new Integration
- get the details of a specific Integration by integration ID
- find Integration by name
- get the details of an Integration by consumer_id
- get the details of an active Integration by consumer_id
- update an Integration
- delete an Integration by integration ID
- get an array of selected resources for an integration
-
\Magento\Integration\Api\OauthServiceInterface:- create a new consumer account
- create access token for provided consumer
- retrieve access token assigned to the consumer
- load consumer by its ID
- load consumer by its key
- execute post to integration (consumer) HTTP Post URL. Generate and return oauth_verifier
- delete the consumer data associated with the integration including its token and nonce
- remove token associated with provided consumer
For information about a public API, see Public interfaces & APIs.
Additional information
Cron options
Cron group configuration can be set at etc/crontab.xml:
outdated_authentication_failures_cleanup- clearing log of outdated token request authentication failuresexpired_tokens_cleanups- delete expired customer and admin tokens
Learn how to configure and run cron in Magento.
You can get more information at the following articles:
data-slots=text