This feature is available from ICM 18.104.22.168.
The API token login feature enables customers to log in to both the Progressive Web App (PWA) or any other REST-based clients and the inSPIRED storefront.
This feature can be useful if certain elements of the PWA (e.g., product listing), but also elements of the inSPIRED storefront (e.g., checkout) should be used together in a project.
The API token login can be enabled generally or domain-specifically. Therefore consider the following settings:
In the appserver.properties, the following property must be configured:
intershop.apitoken.cookie.enabled=truehas to be set in the domain-specific configuration of the site.
The PWA must have cookies enabled. If this is the case, a cookie is written when a user logs in.
The cookie named
apiToken contains a JSON object with the API token. The attribute
'type' indicates the kind of authentication:
'user'for registered users or
'basket'for anonymous users to reference a basket
Other types will be ignored by the Intershop Commerce Management (ICM).
When the ICM starts handling a request and the cookie is present, the ICM ensures that the user is logged in.
For technical reasons, it overwrites the PWA cookie with its own cookie. The difference is that another JSON attribute is added, which is called
If the user is logged into the ICM but no cookie is available when the ICM takes over, the user will be logged out.
The feature is based on the assumption that the PWA and the ICM can read and write each other's cookies. That means that both cookies must have the same domain and the same path. Therefore, the feature only works if the PWA and the ICM are running in the same domain.
When does the ICM write the cookie?
When does the ICM delete the cookie?
|intershop.apitoken.cookie.enabled||'true', if the feature should be active, otherwise anything else.|
|intershop.apitoken.cookie.name||If the cookie should not be named '|
|intershop.apitoken.cookie.maxage||The maximum age of the cookie. Since our session is 60 minutes long, the default is 60.|
|intershop.apitoken.cookie.comment||The API allows to set a comment. That comment can be set here.|
|intershop.apitoken.cookie.sslmode||'true', if the cookie should be SSL-only. The feature will not work if the ICM or the PWA still use HTTP.|
UserLogin is called. For the login, the start-node
LoginUser is called. For the logout, the start-node
Logout is called.
This pipeline does what is done for login and logout in the platform. In f_business , the pipeline is overwritten to call the pipelines for
If there are additional tasks in customer projects when a user is logged in, further overwriting may be necessary.
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 Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.