aboutsummaryrefslogtreecommitdiff
path: root/src/dav
diff options
context:
space:
mode:
Diffstat (limited to 'src/dav')
-rw-r--r--src/dav/mod.rs7
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