| 1 | = AccountManager |
| 2 | |
| 3 | The accountmanager project contains software to manage user accounts. |
| 4 | Users can create an account, log in, and reset their password. |
| 5 | |
| 6 | This is a bare-bones system, the idea is that personal data is stored separately and that this is just for the account management. |
| 7 | |
| 8 | The central class is CurrentUser. Any user that starts using your system starts as an anonymous CurrentUser(dbcon, mailer). dbcon is the connectino with the accounts database and mailer is handling notification mails to the user. |
| 9 | |
| 10 | == Account management |
| 11 | The software provides the main functionality register, login, resetpassword |
| 12 | * register takes name, password and an optional email address. The user can enter anything here and nothing is checked by default, allowing the user to start quickly and work anonymously which is important in some use cases. |
| 13 | * The login procedure takes the name and password. It does not require any cookies to work, so that it automatically complies with the cookie laws. |
| 14 | * The reset-password function allows a user to enter just his user name and request a reset of his password. A new password is then mailed to the mail address that he provided. This reset is only possible if the user entered a working email address. |
| 15 | |
| 16 | == Security |
| 17 | All passwords are stored only after salting and hashing with 512 bit MD5. This follows 2020's standards for this. |
| 18 | |
| 19 | == Usage |
| 20 | |
| 21 | When a new user arrives, your server program creates CurrentUser, typically with a call new CurrentUser(new DBConnection(), new DefaultMailer()). |
| 22 | |
| 23 | To check if a user is logged in you call currentUser.getId(). It can only be non-null if the user has logged in because calling currentuser.login(NamePassword) is the only way to get an id. |
| 24 | |
| 25 | The userID is a UUID and generated uniquely for each new user. All users also have unique user names. |
| 26 | |
| 27 | == Configuration |
| 28 | The database default database as created with |