Interface AuthenticationData


public interface AuthenticationData
Provides authentication credentials for different transport mechanisms.
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    Get the authentication data to include in binary protocol commands.
    Get the HTTP authentication headers to include in requests.
    default Certificate[]
    Get the TLS client certificate chain for mutual authentication.
    default PrivateKey
    Get the TLS client private key for mutual authentication.
    default boolean
    Check whether this authentication data provides HTTP headers.
    default boolean
    Check whether this authentication data provides TLS client certificates.
    default boolean
    Check whether this authentication data provides binary protocol command data.
  • Method Details

    • hasDataForHttp

      default boolean hasDataForHttp()
      Check whether this authentication data provides HTTP headers.
      Returns:
      true if HTTP authentication headers are available, false otherwise
    • getHttpHeaders

      default Set<Map.Entry<String,String>> getHttpHeaders()
      Get the HTTP authentication headers to include in requests.
      Returns:
      a set of header name-value entries for HTTP authentication, or an empty set if none
    • hasDataForTls

      default boolean hasDataForTls()
      Check whether this authentication data provides TLS client certificates.
      Returns:
      true if TLS certificate data is available, false otherwise
    • getTlsCertificates

      default Certificate[] getTlsCertificates()
      Get the TLS client certificate chain for mutual authentication.
      Returns:
      the client certificate chain, or null if not available
    • getTlsPrivateKey

      default PrivateKey getTlsPrivateKey()
      Get the TLS client private key for mutual authentication.
      Returns:
      the client private key, or null if not available
    • hasDataFromCommand

      default boolean hasDataFromCommand()
      Check whether this authentication data provides binary protocol command data.
      Returns:
      true if command data is available for the Pulsar binary protocol, false otherwise
    • getCommandData

      default String getCommandData()
      Get the authentication data to include in binary protocol commands.
      Returns:
      the command data string for binary protocol authentication, or null if not available