REST requests continue to be based on the internal execution of specific ICM pipelines. For each REST request, a prefix pipeline (PrefixREST-Start) is executed to initialize data.
To log in a user (via authentication token or credentials), the ProcessUsersREST-Login pipeline is executed.
Both pipelines generate and update user-specific user groups (anonymous or specific users) and a personalization group ID (PGID) based on existing pipeline logic. Although there was an improved Java implementation based on pipeline nodes, it had not yet been used in these REST pipelines. This has now been rectified to reduce server load for large numbers of REST requests and improve performance further.
The old start node Start has been copied to StartClassic. The improved version is now available as Start. The execution of the previous variant can be controlled via a property (see marked condition and jump node).
This pipeline is executed when a user is to be logged in. The improved version calls the local start node LoginUser whereas in the former version a call to ProcessLogin-LoginUser was executed. The execution of the previous variant can be controlled via a property (see marked condition and call nodes).
The improved version simply logs the user in and executes a Check User pipeline node which refreshes the user groups and PGID.
The previously mentioned change to the ProcessUsersREST pipeline can also affect the extension points used if you do not use the classic approach. This is because the extension points LoginUser (before login) and UserLoggedIn (after login) have been copied from the ProcessLogin pipeline to ProcessUsersREST, and the name of the pipeline is also used for the definition of the extension point.
If the mentioned extension points were used as follows before:
<?xml version="1.0" encoding="UTF-8"?> <extensionpoint:ExtensionPointModel xmlns:extensionpoint="http://www.intershop.de/extensionpoint/2011" name="MyExtensionBeforeLogin"> <extensionBindings type="pipeline" extensionPoint="ProcessLogin-LoginUser" extension="MyExtension-BeforeLoginUser"/> </extensionpoint:ExtensionPointModel>
<?xml version="1.0" encoding="UTF-8"?> <extensionpoint:ExtensionPointModel xmlns:extensionpoint="http://www.intershop.de/extensionpoint/2011" name="MyExtensionAfterLogin"> <extensionBindings type="pipeline" extensionPoint="ProcessLogin-UserLoggedIn" extension="MyExtension-AfterLoginUser"/> </extensionpoint:ExtensionPointModel>
To ensure that the extensions are called in both cases (classic, new), Intershop recommends adding the new extension points to the existing .extension files calling the same extension pipelines afterward:
<?xml version="1.0" encoding="UTF-8"?> <extensionpoint:ExtensionPointModel xmlns:extensionpoint="http://www.intershop.de/extensionpoint/2011" name="MyExtensionBeforeLogin"> <extensionBindings type="pipeline" extensionPoint="ProcessLogin-LoginUser" extension="MyExtension-BeforeLoginUser"/> <extensionBindings type="pipeline" extensionPoint="ProcessUsersREST-LoginUser" extension="MyExtension-BeforeLoginUser"/> </extensionpoint:ExtensionPointModel>
<?xml version="1.0" encoding="UTF-8"?> <extensionpoint:ExtensionPointModel xmlns:extensionpoint="http://www.intershop.de/extensionpoint/2011" name="MyExtensionAfterLogin"> <extensionBindings type="pipeline" extensionPoint="ProcessLogin-UserLoggedIn" extension="MyExtension-AfterLoginUser"/> <extensionBindings type="pipeline" extensionPoint="ProcessUsersREST-UserLoggedIn" extension="MyExtension-AfterLoginUser"/> </extensionpoint:ExtensionPointModel>
Since the new extension point is only used for REST login, a REST-specific extension can also be used.
Since the A/B testing feature is currently no longer supported for REST, the A/B testing-specific checks and other code sections have been removed from PrefixREST.
No migration is necessary. However, you can deselect the new features and continue using the previous solution. To do so, set the following properties in the system:
intershop.rest.useClassicPrefixPipeline=true intershop.rest.useClassicUserLogin=true
If these properties are missing or set to something else than true, the new improved logic will be executed.
The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Website, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.