Package org.apache.arrow.flight.auth
Class BasicServerAuthHandler
java.lang.Object
org.apache.arrow.flight.auth.BasicServerAuthHandler
- All Implemented Interfaces:
ServerAuthHandler
A ServerAuthHandler for username/password authentication.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Interface that this handler delegates for determining if credentials are valid.Nested classes/interfaces inherited from interface org.apache.arrow.flight.auth.ServerAuthHandler
ServerAuthHandler.ServerAuthSender
-
Field Summary
Fields inherited from interface org.apache.arrow.flight.auth.ServerAuthHandler
NO_OP
-
Constructor Summary
ConstructorDescriptionBasicServerAuthHandler
(BasicServerAuthHandler.BasicAuthValidator authValidator) -
Method Summary
Modifier and TypeMethodDescriptionboolean
authenticate
(ServerAuthHandler.ServerAuthSender outgoing, Iterator<byte[]> incoming) Handle the initial handshake with the client.isValid
(byte[] token) Validate the client token provided on each call.
-
Constructor Details
-
BasicServerAuthHandler
-
-
Method Details
-
authenticate
Description copied from interface:ServerAuthHandler
Handle the initial handshake with the client.- Specified by:
authenticate
in interfaceServerAuthHandler
- Parameters:
outgoing
- A writer to send messages to the client.incoming
- An iterator of messages from the client.- Returns:
- true if client is authenticated, false otherwise.
-
isValid
Description copied from interface:ServerAuthHandler
Validate the client token provided on each call.- Specified by:
isValid
in interfaceServerAuthHandler
- Returns:
- An empty optional if the client is not authenticated; the peer identity otherwise (may be the empty string).
-