Interface Authenticator
- All Known Implementing Classes:
AllowAllAuthenticator,SimpleAuthenticator
public interface Authenticator
Provides methods related to authentication of a request. A handler should use the
authenticate(Map)
method directly. SASL isn't currently supported but the interface remains available for custom server implementations.- Author:
- Stephen Mallette (http://stephen.genoprime.com)
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacePerforms the actual SASL negotiation for a single authentication attempt. -
Method Summary
Modifier and TypeMethodDescriptionauthenticate(Map<String, String> credentials) A "standard" authentication implementation that can be used more generically without SASL support.newSaslNegotiator(InetAddress remoteAddress) Provide a SASL handler to perform authentication for an single connection.booleanWhether or not the authenticator requires explicit login.voidSetup is called once upon system startup to initialize theAuthenticator.
-
Method Details
-
requireAuthentication
boolean requireAuthentication()Whether or not the authenticator requires explicit login. If false will instantiate user with AuthenticatedUser.ANONYMOUS_USER. -
setup
Setup is called once upon system startup to initialize theAuthenticator. -
newSaslNegotiator
Provide a SASL handler to perform authentication for an single connection. SASL is a stateful protocol, so a new instance must be used for each authentication attempt.- Parameters:
remoteAddress- the IP address of the client to authenticate to authenticate or null if an internal client (one not connected over the remote transport).
-
authenticate
A "standard" authentication implementation that can be used more generically without SASL support. This implementation is used when a particularChannelizerdoesn't support SASL directly (like basic HTTP authentication).- Throws:
AuthenticationException
-