- All Known Implementing Classes:
- CramMD5Authenticator, DigestMD5Authenticator, LoginAuthenticator, PlainAuthenticator, SASLAuthenticator
public interface ClientAuthenticator
Simplified version of the Java 5 SaslClient interface. This is used to
implement a javamail authentication framework that mimics the Sasl framework
on a 1.4.2 JVM. Only the methods required by the Javamail code are
implemented here, but it should be a simple migration to the fuller SASL
Evaluate a challenge and return a response that can be sent back to the
Return the mechanism name implemented by this authenticator.
Indicates that the authenticator has data that should be sent when the
authentication process is initiated.
Indicates whether the client believes the challenge/response sequence is
byte evaluateChallenge(byte challenge)
- Evaluate a challenge and return a response that can be sent back to the
server. Bot the challenge information and the response information are
"raw data", minus any special encodings used by the transport. For
example, SMTP DIGEST-MD5 authentication protocol passes information as
Base64 encoded strings. That encoding must be removed before calling
evaluateChallenge() and the resulting respose must be Base64 encoced
before transmission to the server.
It is the authenticator's responsibility to keep track of the state of
the evaluations. That is, if the authentication process requires multiple
challenge/response cycles, then the authenticator needs to keep track of
context of the challenges.
challenge - The challenge data.
- An appropriate response for the challenge data.
- Indicates that the authenticator has data that should be sent when the
authentication process is initiated. For example, the SMTP PLAIN
authentication sends userid/password without waiting for a challenge
If this method returns true, then the initial response is retrieved using
evaluateChallenge() passing null for the challenge information.
- True if the challenge/response process starts with an initial
response on the client side.
- Indicates whether the client believes the challenge/response sequence is
- true if the client has evaluated what it believes to be the last
challenge, false if there are additional stages to evaluate.
- Return the mechanism name implemented by this authenticator.
- The string name of the authentication mechanism. This name should
match the names commonly used by the mail servers (e.g., "PLAIN",
"LOGIN", "DIGEST-MD5", etc.).
Copyright © 2003-2009 The Apache Software Foundation. All Rights Reserved.