sneilan / stock-exchange

Personal stock exchange on your laptop!
Other
39 stars 7 forks source link

User Accounts #17

Closed sneilan closed 5 months ago

sneilan commented 10 months ago

Create a user management system so new users can log in, add funds to their account and begin trading.

Users should be saved locally to a sqlite3 database. When server starts up, users will be loaded from the database into memory. Later on, create an admin panel to create users on the fly. Create an interface to be able to swap databases to postgres. Balances are out of scope.

Gateway should be updated to allow authentication with a username and password. API authentication may come later. Higher level systems like main.cpp should not be concerned with authentication. SocketServer may be too low level.

Consider if we need to create JWT tokens and what security exists to prevent users from spoofing websockets.

sneilan commented 10 months ago

Websockets should be implemented first because they provide many authentication schemas, payload length formatting and they will make schema evolution easier to manage.