tuteng commented on a change in pull request #14044:
URL: https://github.com/apache/pulsar/pull/14044#discussion_r798600776
##########
File path:
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationService.java
##########
@@ -85,17 +86,20 @@ public AuthenticationService(ServiceConfiguration conf)
throws PulsarServerExcep
}
}
- public String authenticateHttpRequest(HttpServletRequest request) throws
AuthenticationException {
+ public String authenticateHttpRequest(HttpServletRequest request,
AuthenticationDataSource authData) throws AuthenticationException {
AuthenticationException authenticationException = null;
- AuthenticationDataSource authData = new
AuthenticationDataHttps(request);
- String authMethodName = request.getHeader("X-Pulsar-Auth-Method-Name");
+ String authMethodName =
request.getHeader(AuthenticationFilter.PULSAR_AUTH_METHOD_NAME);
if (authMethodName != null) {
AuthenticationProvider providerToUse =
providers.get(authMethodName);
if (providerToUse == null) {
throw new AuthenticationException(
String.format("Unsupported authentication method:
[%s].", authMethodName));
}
+ if (authData == null) {
Review comment:
To be compatible with the previous implementation
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]