|
|||||||||
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 | |
---|---|
java.lang.String |
auth(java.lang.String clientInput)
Initially called using an input string in the RFC2554 form: "AUTH |
Method Detail |
---|
java.lang.String auth(java.lang.String clientInput) throws RejectException
Depending on the authentication mechanism, the handshaking process may require
many request-response passes. This method will return null
only when the authentication process is finished.
AuthenticationHandlers are associated with a single authentication exchange. If the exchange is stopped (ie fails) and is restarted, a new AuthenticationHandler is created. Upon successful authentication, your implementation of this object becomes part of the MessageContext. Your MessageHandler may upcast your AuthenticationHandler to obtain further information, such as identity.
AuthenticationHandlers do not need to handle the "*" cancel response; this is handled by the framework.
clientInput
- The client's input, eg "AUTH PLAIN dGVzdAB0ZXN0ADEyMzQ="
null
if the authentication process is finished, otherwise a string to hand back to the client.
RejectException
- if authentication fails.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |