|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.subethamail.smtp.auth.LoginAuthenticationHandler
public class LoginAuthenticationHandler
Implements the SMTP AUTH LOGIN mechanism.
You are only required to plug your UsernamePasswordValidator implementation
for username and password validation to take effect.
| Constructor Summary | |
|---|---|
LoginAuthenticationHandler(UsernamePasswordValidator helper)
Creates a new instance of LoginAuthenticationHandler |
|
| Method Summary | |
|---|---|
boolean |
auth(java.lang.String clientInput,
java.lang.StringBuilder response,
ConnectionContext ctx)
Initially called using an input string in the RFC2554 form: "AUTH |
java.util.List<java.lang.String> |
getAuthenticationMechanisms()
If your handler supports RFC 2554 at some degree, then it must return all the supported mechanisms here. |
void |
resetState()
Since a so-designed handler has its own state, it seems reasonable to enable resetting its state. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LoginAuthenticationHandler(UsernamePasswordValidator helper)
| Method Detail |
|---|
public java.util.List<java.lang.String> getAuthenticationMechanisms()
AuthenticationHandler
getAuthenticationMechanisms in interface AuthenticationHandler
public boolean auth(java.lang.String clientInput,
java.lang.StringBuilder response,
ConnectionContext ctx)
throws RejectException
AuthenticationHandlerresponse parameter) at each clientInput.
Depending on the authentication mechanism, the handshaking process may require
many request-response passes. This method will return true only when the authentication process is finished
auth in interface AuthenticationHandlerclientInput - The client's input.response - a buffer filled with your response to the client input.ctx - the connection context filled with the credential of the user if authentication succeeds.
true if the authentication process is finished, false otherwise.
RejectException - if authentication fails.public void resetState()
AuthenticationHandler
resetState in interface AuthenticationHandler
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||