Interface BinaryAuthChallengeHandler
public interface BinaryAuthChallengeHandler
Capability: multi-round challenge/response (SASL-style and custom protocols) for the Pulsar binary
protocol (PIP-478).
The broker's REFRESH_AUTH_DATA refresh sentinel is never delivered here (binary
routing rule 2): a refresh re-produces the current credential through
BinaryAuthDataProvider on a fresh exchange, so this handler only ever sees a genuine challenge
payload — a real round of the challenge conversation.
-
Method Summary
Modifier and TypeMethodDescriptionrespondToChallengeAsync(AuthenticationCallContext ctx, AuthChallenge authChallenge) Respond to a binary-protocolCommandAuthChallenge.
-
Method Details
-
respondToChallengeAsync
CompletableFuture<ChallengeResponse> respondToChallengeAsync(AuthenticationCallContext ctx, AuthChallenge authChallenge) Respond to a binary-protocolCommandAuthChallenge.The framework places the returned bytes in
CommandAuthResponse. Completion is decided by the broker (it replies withCommandConnectedwhen satisfied), so the handler does not signal it; cross-round conversation state is kept in the context's state slot. Never throws synchronously: all failures are reported by completing the returned future exceptionally, never by throwing on the calling thread.- Parameters:
ctx- the per-call context (holds cross-round state)authChallenge- the challenge from the broker- Returns:
- a future of the response for the next
CommandAuthResponse
-