Commit graph

12 commits

Author SHA1 Message Date
1bcaa3d164 Fix license and formatting 2021-03-12 17:24:21 +01:00
4b86d2a6c1 Use a type alias instead of struct for Keys 2020-08-29 01:13:06 +02:00
b2e8141676 Further improvements regarding indents 2020-08-29 00:59:56 +02:00
b155c17337 Refactor reset_prepare() to reduce indents 2020-08-28 22:27:54 +02:00
5b3e56954e Improve random key generation 2020-08-28 22:07:22 +02:00
77e2108403 Fix license 2020-07-29 18:28:06 +02:00
1a34b598db Fix and add rudimentary tests
- Fix test of initial reset page
- Add test for valid password reset URL
- Add test for invalid password reset URL
2020-07-08 23:16:20 +02:00
f737bc589d Cargo update
- cc 1.0.57 -> 1.0.58
- libc 0.2.71 -> 0.2.72
- smallvec 1.4.0 -> 1.4.1
2020-07-08 23:16:04 +02:00
fdd5ae6903 Improve readme and fix typos 2020-07-08 21:22:20 +02:00
592fed030d Print remote address in Errors
In order to be able to filter in IDS/IPS the source address is now
printed in the logs when an error occurs
2020-07-07 17:55:24 +02:00
7b0e4b4a31 Password reset functionality
On the `reset` page an email address can be submitted. If an account
associated with the submitted email address an email is sent
containing an URL. This URL can be used to set a new password.

- Add GPLv3 for licensing
- Add dependencies
  - `rocket_contrib` to be able to use handlebar templates
  - `anyhow` to handle errors
  - `log` for logging
  - `ldap3` to communicate with a LDAP server
  - `lettre` and `lettre_email` to handle the generation of emails and
    to send them
  - `rand` to generate random keys
- Add `README.org` which is also used to generate `README.md`
- Add configuration parameters
  - domain
  - LDAP
    - server
    - base
    - filter
    - bind
    - password
- Change default development address to 0.0.0.0
- Add structs to handle data
- Add functions to handle password reset actions
  - `reset_prepare()` to generate a new key, send it to the requestor
    and keep it in the memory
  - `set_password()` to check for the key and set the password
- Add routes
- Add tests
- Add templates
  - `reset.html.hbs` to submit an email address
  - `reset_key.html.hbs` to set the new password
2020-07-06 15:30:45 +02:00
6d247c63ba Prepare rocket requisites to start with
A basic index page with basic configuration and a rudimentary test.
2020-07-03 16:10:46 +02:00