nodece commented on code in PR #19197:
URL: https://github.com/apache/pulsar/pull/19197#discussion_r1068942276
##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProvider.java:
##########
@@ -138,10 +145,20 @@ default CompletableFuture<Boolean>
authenticateHttpRequestAsync(HttpServletReque
/**
* Set response, according to passed in request.
* and return whether we should do following chain.doFilter or not.
+ *
+ * <p>Implementations of this method MUST modify the request by adding the
{@link AuthenticatedRoleAttributeName}
+ * and the {@link AuthenticatedDataAttributeName} attributes.</p>
+ *
+ * @return Set response, according to passed in request, and return
whether we should do following chain.doFilter.
+ * @throws Exception when authentication failed
* @deprecated use and implement {@link
AuthenticationProvider#authenticateHttpRequestAsync} instead.
*/
@Deprecated
default boolean authenticateHttpRequest(HttpServletRequest request,
HttpServletResponse response) throws Exception {
- throw new AuthenticationException("Not supported");
+ AuthenticationState authenticationState = newHttpAuthState(request);
Review Comment:
I think we should throw an exception, and keep the old design.
```
throw new AuthenticationException("Not supported");
```
--
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]