From e92efb863f10e36522ac1241b16276cd55686e1f Mon Sep 17 00:00:00 2001 From: khai96_ Date: Thu, 30 May 2019 17:34:09 +0700 Subject: Apply WWW_AUTHENTICATE to all Unauthorized branches --- src/auth.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/auth.rs b/src/auth.rs index 762746b..2c98622 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -122,17 +122,6 @@ impl Middleware for Auth { if match_auth(auth_req, required_auth) { return Ok(Response::Done(resp)); } - - return Ok(Response::Done( - HttpResponse::Unauthorized().body( - build_unauthorized_response( - &req, - ContextualError::InvalidHTTPCredentials, - true, - StatusCode::UNAUTHORIZED, - ) - ) - )); } Ok(Response::Done( -- cgit v1.2.3