diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-02-27 18:33:49 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-02-27 18:33:49 +0100 |
commit | 7f35e68bfe21c61f4da9e37f127dd7abb73291fa (patch) | |
tree | 2889fc4ee0ef7451b22b0c34826e9d0187e8e49f /src/dav | |
parent | 9a58a4e932156e0207380bb3b0a93a59864b0e1c (diff) | |
download | aerogramme-7f35e68bfe21c61f4da9e37f127dd7abb73291fa.tar.gz aerogramme-7f35e68bfe21c61f4da9e37f127dd7abb73291fa.zip |
Refactor
Diffstat (limited to 'src/dav')
-rw-r--r-- | src/dav/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dav/mod.rs b/src/dav/mod.rs index 709abd5..ac25f2d 100644 --- a/src/dav/mod.rs +++ b/src/dav/mod.rs @@ -106,6 +106,13 @@ async fn auth( .ok_or(anyhow!("Missing colon in Authorization, can't split decoded value into a username/password pair"))?; // Call login provider + let creds = match login.login(username, password).await { + Ok(c) => c, + Err(e) => return Ok(Response::builder() + .status(401) + .body(Full::new(Bytes::from("Wrong credentials")))?), + }; + // Call router with user |