Upgrade guide
This is a quick guide allowing you to switch:
- from the old authentication using {AUTH_CLIENT_ID} and {AUTH_TOKEN}
- to the new one using {LAUNCHER_TOKEN}.
1 - Credentials
Before, two accounts were provided to website integrator: an external Retail operations API account, and a launcher Retail operations account
Now, only the external Retail operations API account is provided and must be used by external websites. This account can now generate a token to open the launcher.
2 - Change URL
The launcher url changes from :
{URL}?authClientId={AUTH_CLIENT_ID}&authToken={AUTH_TOKEN}&application={APPLICATION}&distribution={DISTRIBUTION}
to :
{URL}?launcherToken={LAUNCHER_TOKEN}&application={APPLICATION}&distribution={DISTRIBUTION}
3 - LauncherToken generation
The launcher token must be generated from the api GET /api/externals/v1/launcher/token using the API account.
For a new project : the launcher token api must be called with the parameter
{
type: 'create'
}
For an existing project : the launcher token api must be called with the parameter
{
type: 'edit'
, projectID: int // projectID from Retail operations
, documentTypeID: int // documentTypeID from Retail operations
, documentID: int // documentID from Retail operations
}
4 - LauncherToken refresh
When requested by the “AuthenticationRequired” PostMessage :
The Launcher was waiting for an "Authentication" PostMessage .
The Launcher is waiting for the "AuthenticationLauncherToken" PostMessage. The token must be generated from the API using the same method and information than used for the "LauncherToken generation".
That's all the changes you need to make to use the new authentication system.