Add UserRegistry to store all existing users and UserCleanupJob to periodicly remove expired user #189
Reference in New Issue
Block a user
Delete Branch "feat/user-serverside"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds the User class to store the username, user id and connect it to its session. If a user disconnects, the association (by the session id) is released and the user is left afloat. After a given time, the user is seen as expired and deleted.
All users are stored in the UserRegistry. It provides synchronized access to ensure data integrity.
The UserFactory is used to create new users and iterates over usernames until the desiredName (with suffix) is free.
As mentioned earlier, a UserCleanupJob has been put in place to periodicly check if any user expired and can be collected. If a user is able to reconnect within that timewindow, it can persist.
The user is later used to link the network to the domain.
mentioned in commit
47544c4f1b