| Age | Commit message (Collapse) | Author |
|
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.
|
|
This allows users to register.
|
|
|
|
This makes sure the implementations of Register() and Authenticate() are
compatible.
|
|
This function validates a username and password against the database.
|
|
This function creates a new user and sets the username and bcrypt-hashed
password.
|