Interface AuthenticateState

All Known Implementing Classes:
SMTPProtocolHandler

public interface AuthenticateState
Operations available when responding to successful SASL authentication.

This interface is provided to HelloHandler.authenticated(org.bluezoo.gumdrop.smtp.handler.AuthenticateState, java.security.Principal) after the connection has completed SASL authentication. The handler receives the authenticated Principal and decides whether to accept it.

The SASL mechanics (challenge/response exchange) are handled by the connection. The handler only deals with the policy decision of whether to accept the authenticated identity.

Methods map to reply codes: accept → 235, reject → 535, rejectAndClose → 535.

Author:
Chris Burdess
See Also:
  • Method Details

    • accept

      void accept(MailFromHandler handler)
      Accepts the authenticated principal.

      Sends a 235 success response and transitions to mail-from state.

      Parameters:
      handler - receives subsequent MAIL FROM commands
    • reject

      void reject(HelloHandler handler)
      Rejects the authenticated principal.

      Sends a 535 authentication failed response. The client may retry authentication.

      Parameters:
      handler - receives retry or other commands
    • rejectAndClose

      void rejectAndClose()
      Rejects and closes the connection.

      Sends a 535 response and closes the connection. Use this for repeated authentication failures or policy violations.

    • serverShuttingDown

      void serverShuttingDown()
      Server is shutting down.