Retail Pro Prism: Understanding the Access Token

Understanding the Access Token

This article provides a basic explanation of what an "Access Token" is, as it relates to Retail Pro Prism.

This is useful knowledge if you are experiencing unexpected connection issues between a Retail Pro Prism client and a Retail Pro Prism server.
 

What is an Access Token?

When a user logs into Retail Pro Prism and provides a username and password, that information is packaged up with the workstation name and is used to create a "user session" on the Retail Pro Prism server. This user session includes the user's information such as preferences, permissions and other data. This information is loaded into memory when the user logs in, and it is cleared from memory when the user logs out. To identify that session and differentiate it from other sessions, Retail Pro Prism generates an access "token". This access token in Retail Pro Prism is a long, unique number similar to "5D05333773CB46528E45FBA500658CB2." The login process generates this access token number and provides it to the Retail Pro Prism client that has logged in.

All subsequent requests to the Retail Pro Prism server (from the Retail Pro Prism client) require that an access token be provided in the header of the request as the Auth-Session. If you were to look at the request header(s) from the web client, you would see something similar to "Auth-Session: 5D05333773CB46528E45FBA500658CB2."

When the Retail Pro Prism server gets a request form the client, one of the first things the server does is use the access token to locate the user session, and passes that information to the server that is processing the request. Without the user session, the server would not be able to verify permissions, change workflow based on preferences, or even allow simply data access.
 

What is the issue that can occur with the Access Token?

If for whatever reason the server is "reset" (stopped / restarted / crashed and restarted / etc...), all the user sessions (and in turn the access tokens) are lost from memory. This can cause problems related to failed communication between the Retail Pro Prism client and the Retail Pro Prism server. Unknown to the client, the access token is now invalid, and this will cause all requests to the Retail Pro Prism server to fail.

Please Note: Access Token(s) will become invalid when the Retail Pro Prism server performs a complete backup. This is because a complete backup requires the database services to be stopped while copying files. The database services are restarted once the complete backup is finished.

One symptom of this issue - is when day-to-day replication has unexpectedly stopped. When you begin to troubleshoot, you will notice that each workstation (that is communicating with the server) has a consumer count = 0.

In the xxxx log, you will find authorization errors. At the same time, you may notice that the licensing logs indicate that everything is healthy. This can occur if the server has been "reset", without the workstations subsequently being reset.?
 

What can I do if I experience this issue?

In this example, the workstations must be reset, one-by-one, and after they reboot they will be able to connect successfully as they will acquire new and valid auth-session tokens. As the workstations reconnect, you will see the consumer counts change from 0 to 1. Shortly after that, the day-to-day replication process will begin processing again.

To learn more about Access Tokens, visit this link

 

 

Published on Feb 7, 2017 in Architecture, FAQ

 

Find Another Article


Read More in Architecture