public interface Authentication extends Closeable, Serializable
Modifier and Type | Method and Description |
---|---|
default void |
authenticationStage(String requestUrl,
AuthenticationDataProvider authData,
Map<String,String> previousResHeaders,
CompletableFuture<Map<String,String>> authFuture)
An authentication Stage.
|
void |
configure(Map<String,String> authParams)
Deprecated.
This method will be deleted on version 2.0, instead please use configure(String
encodedAuthParamString) which is in EncodedAuthenticationParameterSupport for now and will be
integrated into this interface.
|
default AuthenticationDataProvider |
getAuthData() |
default AuthenticationDataProvider |
getAuthData(String brokerHostName)
Get/Create an authentication data provider which provides the data that this client will be sent to the broker.
|
String |
getAuthMethodName() |
default Set<Map.Entry<String,String>> |
newRequestHeader(String hostName,
AuthenticationDataProvider authData,
Map<String,String> previousResHeaders)
Add an authenticationStage that will complete along with authFuture.
|
void |
start()
Initialize the authentication provider.
|
String getAuthMethodName()
default AuthenticationDataProvider getAuthData() throws PulsarClientException
PulsarClientException.GettingAuthenticationDataException
- if there was error getting the authentication data to usePulsarClientException
- any other errordefault AuthenticationDataProvider getAuthData(String brokerHostName) throws PulsarClientException
brokerHostName
- target broker host namePulsarClientException
@Deprecated void configure(Map<String,String> authParams)
authParams
- void start() throws PulsarClientException
PulsarClientException
default void authenticationStage(String requestUrl, AuthenticationDataProvider authData, Map<String,String> previousResHeaders, CompletableFuture<Map<String,String>> authFuture)
Copyright © 2017–2020 Apache Software Foundation. All rights reserved.