mattisonchao commented on code in PR #20238:
URL: https://github.com/apache/pulsar/pull/20238#discussion_r1187515180
##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationService.java:
##########
@@ -171,20 +172,26 @@ public String authenticateHttpRequest(HttpServletRequest
request, Authentication
authData = authenticationState.getAuthDataSource();
}
// Backward compatible, the authData value was null in the
previous implementation
- return providerToUse.authenticate(authData);
+ return providerToUse.authenticateAsync(authData).get();
} catch (AuthenticationException e) {
if (LOG.isDebugEnabled()) {
LOG.debug("Authentication failed for provider " +
providerToUse.getAuthMethodName() + " : "
+ e.getMessage(), e);
}
throw e;
+ } catch (ExecutionException | InterruptedException e) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Authentication failed for provider " +
providerToUse.getAuthMethodName() + " : "
+ + e.getMessage(), e);
+ }
+ throw new RuntimeException(e);
Review Comment:
I am unsure who will use it. Should we consider remark interrupted in the
current Thread?
--
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]