Interface AuthenticateState
- All Known Implementing Classes:
SMTPProtocolHandler
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 Summary
Modifier and TypeMethodDescriptionvoidaccept(MailFromHandler handler) Accepts the authenticated principal.voidreject(HelloHandler handler) Rejects the authenticated principal.voidRejects and closes the connection.voidServer is shutting down.
-
Method Details
-
accept
Accepts the authenticated principal.Sends a 235 success response and transitions to mail-from state.
- Parameters:
handler- receives subsequent MAIL FROM commands
-
reject
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.
-