Interface SmtpAuthenticatorHandler

All Known Implementing Classes:
CramMD5AuthenticationHandler, LoginAuthenticationHandler, PlainAuthenticationHandler

public interface SmtpAuthenticatorHandler
Represents an authenticator handler.
  • Method Details

    • getName

      String getName()
      Returns the name of the SMTP authentication protocol.
      Returns:
      The protocol name, for instance PLAIN.
    • authenticate

      boolean authenticate(SmtpCommand command, SmtpExchangeHandler exchangeHandler, SmtpServerOptions options) throws SmtpProtocolException
      Authenticates the client.
      Parameters:
      command - The initial AUTH command with its parameters.
      exchangeHandler - The exchange handler if challenge responses from the client is needed.
      options - The options.
      Returns:
      true if the user has been authenticated, false otherwise (invalid credentials).
      Throws:
      SmtpProtocolException
    • setSessionProperties

      default void setSessionProperties(Properties properties, SmtpServerOptions options)
      Callback to allow this authenticator to inject properties for the Session if needed.
      Parameters:
      properties - The session properties.
      options - The options.