maskit commented on a change in pull request #1087: Add basic authentication 
plugin
URL: https://github.com/apache/incubator-pulsar/pull/1087#discussion_r165630767
 
 

 ##########
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/web/AuthenticationFilter.java
 ##########
 @@ -60,8 +63,11 @@ public void doFilter(ServletRequest request, 
ServletResponse response, FilterCha
             if (LOG.isDebugEnabled()) {
                 LOG.debug("[{}] Authenticated HTTP request with role {}", 
request.getRemoteAddr(), role);
             }
-        } catch (AuthenticationException e) {
+        } catch (PulsarHttpAuthenticationException e) {
             HttpServletResponse httpResponse = (HttpServletResponse) response;
+            if (isNotBlank(e.getRealmInformation())) {
+                ((HttpServletResponse) response).setHeader("WWW-Authenticate", 
e.getRealmInformation());
 
 Review comment:
   Alright.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to