Interface AuthenticationData
public interface AuthenticationData
Provides authentication credentials for different transport mechanisms.
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringGet 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 PrivateKeyGet the TLS client private key for mutual authentication.default booleanCheck whether this authentication data provides HTTP headers.default booleanCheck whether this authentication data provides TLS client certificates.default booleanCheck whether this authentication data provides binary protocol command data.
-
Method Details
-
hasDataForHttp
default boolean hasDataForHttp()Check whether this authentication data provides HTTP headers.- Returns:
trueif HTTP authentication headers are available,falseotherwise
-
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:
trueif TLS certificate data is available,falseotherwise
-
getTlsCertificates
Get the TLS client certificate chain for mutual authentication.- Returns:
- the client certificate chain, or
nullif not available
-
getTlsPrivateKey
Get the TLS client private key for mutual authentication.- Returns:
- the client private key, or
nullif not available
-
hasDataFromCommand
default boolean hasDataFromCommand()Check whether this authentication data provides binary protocol command data.- Returns:
trueif command data is available for the Pulsar binary protocol,falseotherwise
-
getCommandData
Get the authentication data to include in binary protocol commands.- Returns:
- the command data string for binary protocol authentication, or
nullif not available
-