aboutsummaryrefslogtreecommitdiffstats
path: root/src/auth.rs
diff options
context:
space:
mode:
authorjikstra <jikstra@disroot.org>2021-09-02 13:33:58 +0000
committerjikstra <jikstra@disroot.org>2021-09-02 13:33:58 +0000
commitb94bb361e30e90656edfce5f9a63d41452ba100f (patch)
tree3ed8ce363ee139b887465b80ff4d0bf0d9d1d227 /src/auth.rs
parentImplement a raw rendering mode for recursive folder download (diff)
downloadminiserve-b94bb361e30e90656edfce5f9a63d41452ba100f.tar.gz
miniserve-b94bb361e30e90656edfce5f9a63d41452ba100f.zip
Fix rebase
Diffstat (limited to 'src/auth.rs')
-rw-r--r--src/auth.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/auth.rs b/src/auth.rs
index 43aca17..efdeefb 100644
--- a/src/auth.rs
+++ b/src/auth.rs
@@ -87,10 +87,10 @@ fn handle_auth(req: &HttpRequest) -> Result<(), ContextualError> {
}
match BasicAuthParams::try_from_request(req) {
- Ok(cred) => match match_auth(cred, required_auth) {
+ Ok(cred) => match match_auth(&cred, required_auth) {
true => {
req.extensions_mut().insert(CurrentUser {
- name: cred_params.username,
+ name: cred.username
});
Ok(())
},