Interface HttpAuthChallengeHandler
Handles the existing Pulsar SASL-over-HTTP mechanism, where the server returns HTTP 401
carrying the challenge in Pulsar's custom SASL headers (for example SASL-Token /
State / SASL-Server-ID) rather than the standard WWW-Authenticate header.
Standard WWW-Authenticate-based schemes (for example HTTP digest) are expected to be
served by a separate sibling interface; the framework's HTTP auth driver dispatches to whichever a
plugin implements.
-
Method Summary
Modifier and TypeMethodDescriptionCompute the headers for the next round.
-
Method Details
-
respondToHttpChallengeAsync
Compute the headers for the next round.The server's challenge headers from the prior
401are available viaHttpAuthCallContext.serverChallengeHeaders(); the returnedHttpAuthHeadersare attached to the resubmitted request. 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 the server challenge and cross-round state)- Returns:
- a future of the headers for the resubmitted request
-