nodece commented on code in PR #19295:
URL: https://github.com/apache/pulsar/pull/19295#discussion_r1083305247


##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/OneStageAuthenticationState.java:
##########
@@ -61,13 +80,47 @@ public AuthenticationDataSource getAuthDataSource() {
         return authenticationDataSource;
     }
 
+    /**
+     * Warning: this method is not intended to be called concurrently.
+     */
+    @Override
+    public CompletableFuture<AuthData> authenticateAsync(AuthData authData) {
+        if (authRole != null) {
+            // Authentication is already completed
+            return CompletableFuture.completedFuture(null);
+        }
+        this.authenticationDataSource = new AuthenticationDataCommand(

Review Comment:
   Your means that a single-stage authentication doesn't refresh authentication 
data, if so, when having `AuthChallenge`, we must new an `AuthenticationState`.
   



-- 
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]

Reply via email to