From 5c5b0c75509364f64c9af48595fc2dc95b0ba849 Mon Sep 17 00:00:00 2001 From: boastful-squirrel Date: Wed, 1 May 2019 17:08:15 +0200 Subject: Added doc --- src/auth.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/auth.rs b/src/auth.rs index b5a9867..23ea668 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -129,6 +129,9 @@ impl Middleware for Auth { } } +/// Builds the unauthorized response body +/// The reason why log_error_chain is optional is to handle cases where the auth pop-up appears and when the user clicks Cancel. +/// In those case, we do not log the error to the terminal since it does not really matter. fn build_unauthorized_response( req: &HttpRequest, error: ContextualError, -- cgit v1.2.3