未验证 提交 c7dc7824 编写于 作者: J Joshua Decosta 提交者: GitHub

passes on authenticationData (#7694)

# Fixes #7693

Motivation
When trying to chase down a bug in my custom AuthenticationProvider I found that when attempting to consume a topic that I wasn't authorized on would fail to produce an unauthorized response while using the pulsar-client. I noticed that the canConsumeAsync within AuthorizationService canLookUpAsync doesn't pass along the AuthenticationDataSource when it should. My code relied on that to be passed down each time and thus my methods would never return.

# Modifications
I've added the AuthenticationDataSource to the canConsumeAsync method.
上级 3b41dced
......@@ -304,7 +304,7 @@ public class AuthorizationService {
topicName.toString(), role, ex.getMessage());
}
}
canConsumeAsync(topicName, role, null, null).whenComplete((consumeAuthorized, e) -> {
canConsumeAsync(topicName, role, authenticationData, null).whenComplete((consumeAuthorized, e) -> {
if (e == null) {
if (consumeAuthorized) {
finalResult.complete(consumeAuthorized);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册