net.sf.dict4j.command
Class AuthCommand
java.lang.Object
net.sf.dict4j.command.AbstractCommand
net.sf.dict4j.command.AuthCommand
- All Implemented Interfaces:
- Command
public class AuthCommand
- extends AbstractCommand
3.11. The AUTH Command
AUTH username authentication-string
The client can authenticate itself to the server using a username and password.
The authentication-string will be computed as in the APOP protocol discussed in [RFC1939].
Briefly, the authentication-string is the MD5 checksum of the concatenation of the msg-id
(obtained from the initial banner) and the "shared secret" that is stored in the server and
client configuration files. Since the user does not have to type this shared secret when
accessing the server, the shared secret can be an arbitrarily long passphrase.
Because of the computational ease of computing the MD5 checksum, the shared secret should be
significantly longer than a usual password.
Constructor Summary |
AuthCommand(java.lang.String username,
java.lang.String password,
java.lang.String messageId)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AuthCommand
public AuthCommand(java.lang.String username,
java.lang.String password,
java.lang.String messageId)
getResponseHeaderCodes
protected ResponseEnum[] getResponseHeaderCodes()
- Specified by:
getResponseHeaderCodes
in class AbstractCommand
checkResponseCodeForServerException
protected void checkResponseCodeForServerException(ResponseEnum responseEnum)
throws DictServerException
- Overrides:
checkResponseCodeForServerException
in class AbstractCommand
- Throws:
DictServerException
getString
protected java.lang.String getString()
- Specified by:
getString
in class AbstractCommand
isSuccess
public boolean isSuccess()