net.sf.dict4j.command
Class AuthCommand

java.lang.Object
  extended by net.sf.dict4j.command.AbstractCommand
      extended by 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.


Field Summary
 
Fields inherited from class net.sf.dict4j.command.AbstractCommand
responseCode, responseStatus
 
Constructor Summary
AuthCommand(java.lang.String username, java.lang.String password, java.lang.String messageId)
           
 
Method Summary
protected  void checkResponseCodeForServerException(ResponseEnum responseEnum)
           
protected  ResponseEnum[] getResponseHeaderCodes()
           
protected  java.lang.String getString()
           
 boolean isSuccess()
           
 
Methods inherited from class net.sf.dict4j.command.AbstractCommand
getResponseCode, getResponseEnum, getResponseHeaderEnum, getResponseStatus, parseResponse, parseResponseHeader, receiveHeader, send, stripQuotes, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AuthCommand

public AuthCommand(java.lang.String username,
                   java.lang.String password,
                   java.lang.String messageId)
Method Detail

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()