|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AuthenticationHandler
The interface that enables challenge-response communication necessary for SMTP AUTH.
Since the authentication process can be stateful, an instance of this class can be stateful too.
Do not share a single instance of this interface if you don't explicitly need to do so.
| Method Summary | |
|---|---|
boolean |
auth(java.lang.String clientInput,
java.lang.StringBuffer response)
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. |
| Method Detail |
|---|
java.util.List<java.lang.String> getAuthenticationMechanisms()
boolean auth(java.lang.String clientInput,
java.lang.StringBuffer response)
throws RejectException
response 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
clientInput - The client's input.response - a buffer filled with your response to the client input.
true if the authentication process is finished, false otherwise.
RejectException - if authentication fails.void resetState()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||