Package org.apache.bookkeeper.auth
Interface ClientAuthProvider
-
- All Known Implementing Classes:
SASLClientAuthProvider
public interface ClientAuthProvider
Client authentication provider interface. This must be implemented by any party wishing to implement an authentication mechanism for bookkeeper connections.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ClientAuthProvider.Factory
A factory to create the authentication providers for bookkeeper clients.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
close()
Release resources.void
init(AuthCallbacks.GenericCallback<AuthToken> cb)
Initiate the authentication.default void
onProtocolUpgrade()
Callback to let the provider know that the underlying protocol is changed.void
process(AuthToken m, AuthCallbacks.GenericCallback<AuthToken> cb)
Process a response from the server.
-
-
-
Method Detail
-
init
void init(AuthCallbacks.GenericCallback<AuthToken> cb)
Initiate the authentication. cb will receive the initial authentication message which should be sent to the server. cb may not be called if authentication is not requires. In this case, completeCb should be called.
-
onProtocolUpgrade
default void onProtocolUpgrade()
Callback to let the provider know that the underlying protocol is changed. For instance this will happen when a START_TLS operation succeeds
-
process
void process(AuthToken m, AuthCallbacks.GenericCallback<AuthToken> cb)
Process a response from the server. cb will receive the next message to be sent to the server. If there are no more messages to send to the server, cb should not be called, and completeCb must be called instead.
-
close
default void close()
Release resources.
-
-