nodece commented on code in PR #19295:
URL: https://github.com/apache/pulsar/pull/19295#discussion_r1082207478
##########
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:
I have one question:
When having `AuthChallenge`, do we need to renew `AuthenticationState`?
It looks like so.
--
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]