Interface BinaryAuthDataProvider

All Known Subinterfaces:
SinglePassAuthentication

public interface BinaryAuthDataProvider
Capability: single-pass credential exchange for the Pulsar binary protocol (PIP-478).

A plugin implements this when it can present a credential the broker accepts or rejects in a single round trip (token, basic, OAuth2 access token, Athenz role token, or mTLS via the built-in TlsAuthentication). This capability is required for any plugin used on the binary transport.

  • Method Details

    • authMethodName

      String authMethodName()
      Returns:
      the stable identifier sent in CommandConnect.auth_method_name
    • getAuthDataAsync

      Produce a credential for the binary-protocol connection. The returned BinaryAuthData carries the auth_data bytes for CommandConnect; the framework pairs them with authMethodName(). Completes exceptionally on failure (see the error model in PulsarClientException). 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
      Returns:
      a future of the binary-protocol credential