aboutsummaryrefslogtreecommitdiffstats
path: root/src/auth.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-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(())
},