maskit commented on a change in pull request #1087: Add basic authentication plugin URL: https://github.com/apache/incubator-pulsar/pull/1087#discussion_r162931525
########## File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/web/AuthenticationFilter.java ########## @@ -42,11 +43,18 @@ private static final Logger LOG = LoggerFactory.getLogger(AuthenticationFilter.class); private final AuthenticationService authenticationService; + private final boolean isBasic; public static final String AuthenticatedRoleAttributeName = AuthenticationFilter.class.getName() + "-role"; public AuthenticationFilter(PulsarService pulsar) { this.authenticationService = pulsar.getBrokerService().getAuthenticationService(); + if (pulsar.getConfiguration().getAuthenticationProviders() + .contains(AuthenticationProviderBasic.class.getName())) { + isBasic = true; Review comment: I don?t think we are always be able to gather information on initialization. For example, Digest authentication needs to generate a challenge (nonce) every time. ---------------------------------------------------------------- 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