This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 02e64d850c7 [improve][broker] Replace authenticate with 
authenticateAsync (#19313)
02e64d850c7 is described below

commit 02e64d850c725f4f35a06919f7a2b02554b05a38
Author: Michael Marshall <[email protected]>
AuthorDate: Tue Jan 24 00:02:30 2023 -0600

    [improve][broker] Replace authenticate with authenticateAsync (#19313)
---
 .../org/apache/pulsar/broker/authentication/AuthenticationProvider.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProvider.java
 
b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProvider.java
index f150a084237..f51e96ca9a7 100644
--- 
a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProvider.java
+++ 
b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProvider.java
@@ -156,7 +156,7 @@ public interface AuthenticationProvider extends Closeable {
     @Deprecated
     default boolean authenticateHttpRequest(HttpServletRequest request, 
HttpServletResponse response) throws Exception {
         AuthenticationState authenticationState = newHttpAuthState(request);
-        String role = authenticate(authenticationState.getAuthDataSource());
+        String role = 
authenticateAsync(authenticationState.getAuthDataSource()).get();
         request.setAttribute(AuthenticatedRoleAttributeName, role);
         request.setAttribute(AuthenticatedDataAttributeName, 
authenticationState.getAuthDataSource());
         return true;

Reply via email to