clean up logging in BasicHttpAuthenticationFilter
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 @@
* @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 @@
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) {