shiro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdem...@apache.org
Subject [2/2] shiro git commit: clean up logging in BasicHttpAuthenticationFilter
Date Tue, 31 Jan 2017 01:43:55 GMT
clean up logging in BasicHttpAuthenticationFilter


Project: http://git-wip-us.apache.org/repos/asf/shiro/repo
Commit: http://git-wip-us.apache.org/repos/asf/shiro/commit/ea7eb002
Tree: http://git-wip-us.apache.org/repos/asf/shiro/tree/ea7eb002
Diff: http://git-wip-us.apache.org/repos/asf/shiro/diff/ea7eb002

Branch: refs/heads/master
Commit: ea7eb0029660ad437c0c820e3d8f35a49ad81c1e
Parents: 3436fe6
Author: Brian Demers <bdemers@apache.org>
Authored: Mon Jan 30 20:39:23 2017 -0500
Committer: Brian Demers <bdemers@apache.org>
Committed: Mon Jan 30 20:39:23 2017 -0500

----------------------------------------------------------------------
 .../web/filter/authc/BasicHttpAuthenticationFilter.java     | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/shiro/blob/ea7eb002/web/src/main/java/org/apache/shiro/web/filter/authc/BasicHttpAuthenticationFilter.java
----------------------------------------------------------------------
diff --git a/web/src/main/java/org/apache/shiro/web/filter/authc/BasicHttpAuthenticationFilter.java
b/web/src/main/java/org/apache/shiro/web/filter/authc/BasicHttpAuthenticationFilter.java
index 8598c2e..ac9c28b 100644
--- a/web/src/main/java/org/apache/shiro/web/filter/authc/BasicHttpAuthenticationFilter.java
+++ b/web/src/main/java/org/apache/shiro/web/filter/authc/BasicHttpAuthenticationFilter.java
@@ -325,9 +325,8 @@ public class BasicHttpAuthenticationFilter extends AuthenticatingFilter
{
      * @return false - this sends the challenge to be sent back
      */
     protected boolean sendChallenge(ServletRequest request, ServletResponse response) {
-        if (log.isDebugEnabled()) {
-            log.debug("Authentication required: sending 401 Authentication challenge response.");
-        }
+        log.debug("Authentication required: sending 401 Authentication challenge response.");
+
         HttpServletResponse httpResponse = WebUtils.toHttp(response);
         httpResponse.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
         String authcHeader = getAuthcScheme() + " realm=\"" + getApplicationName() + "\"";
@@ -359,9 +358,7 @@ public class BasicHttpAuthenticationFilter extends AuthenticatingFilter
{
             return createToken("", "", request, response);
         }
 
-        if (log.isDebugEnabled()) {
-            log.debug("Attempting to execute login with headers [" + authorizationHeader
+ "]");
-        }
+        log.debug("Attempting to execute login with auth header");
 
         String[] prinCred = getPrincipalsAndCredentials(authorizationHeader, request);
         if (prinCred == null || prinCred.length < 2) {


Mime
View raw message