Now the system tracks user state we can finally remove it from the listeners.
Here's the full SP from #
GPII-529 (well actually on the mailing list)
- A new URL is available for requesting the login OR logout of a user (depending on whether they're currently logged in). The new URL is: /user/<token>/logonChange
- tools that are used for logging users in and out (such as the PMT, User Listeners, etc) now can use this URL to request that the logon state for a user changes. This is probably particularly relevant for the RFID listener
- The requirements for implementing a user listener has been decreased, as it now only requires implementing the mechanism for reading (/scanning/etc) the token and sending it to the /user/<token>/logonChange - and not worrying about whether any other user is logged in, etc.
- Documentation has been updated and can be found at: https://github.com/GPII/universal/blob/master/documentation/loginAndLogoutFlow.md
So most state handling can be removed from the listeners and the following events passed on to the URL endpoint
- Inserted <user token>
- removed <last inserted user token for this device>
- Note the last user seen must be remembered per USB device
- Touched + removed <user token>