Store hashed passwords (#7)

Use if let instead of unwrap

Default to invalid password if could not calculate

Move hash password methdo and return Result

Rename get_password method

Default to empty password when no pwd is received

Store hashed passwords

Store passwords hashed with Argon2 and verify password with that stored
hash.

Co-authored-by: Guillem Nieto <gnieto.talo@gmail.com>
This commit is contained in:
gnieto 2020-04-14 22:25:44 +02:00 committed by timo
parent abcce95dd8
commit fa9e127a1e
6 changed files with 148 additions and 21 deletions

View file

@ -28,3 +28,4 @@ ruma-federation-api = "0.0.1"
serde = "1.0.106"
tokio = { version = "0.2.16", features = ["macros"] } #rt-threaded
rand = "0.7.3"
rust-argon2 = "0.8.2"