diff options
Diffstat (limited to 'src/auth.rs')
-rw-r--r-- | src/auth.rs | 4 |
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(()) }, |