summaryrefslogtreecommitdiff
path: root/password_test.go
AgeCommit message (Collapse)Author
11 daysSwitch Register() and Authenticate() to sql.Txxengineering
Using sql.Tx (database transactions) instead of a plain database has the advantage that the caller can wrap multiple library calls into one transaction. This guarantees that no database entries change between the library calls which is critical to prevent race conditions.
2026-06-21Add `register` HTTP handlerxengineering
This allows users to register.
2026-06-21Fix wrong error messagexengineering
2026-06-20Add integration test TestRegisterAuthenticatexengineering
This makes sure the implementations of Register() and Authenticate() are compatible.
2026-06-20Add Authenticate()xengineering
This function validates a username and password against the database.
2026-06-20Add Register()xengineering
This function creates a new user and sets the username and bcrypt-hashed password.