Class ImapAuth
java.lang.Object
ImapAuth
- public class ImapAuth
- extends Object
A class to provide an interface for authenticating against an IMAP server.
To perform the authentication, the class will open a socket to the
specified IMAP server on the default IMAP port and try to authenticate
the user against it.
TODO: ConfigMgr support?
- Version:
- $Revision: #4 $
- Author:
- Kevin Thompson [antiduh@csh.rit.edu]
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
defaultHost
public static final String defaultHost
- See Also:
- Constant Field Values
IMAP_PORT
public static final int IMAP_PORT
- See Also:
- Constant Field Values
ImapAuth
public ImapAuth()
authenticate
public static boolean authenticate(DrinkLoggerSpec log,
String username,
String password)
- Wrapper function - uses the default host and port.
authenticate
public static boolean authenticate(DrinkLoggerSpec log,
String username,
String password,
String hostname,
int port)
- Perform the authentication.
Open a socket to the server, look for the server banner, send the username
and password, look for the response, quit.
- Parameters:
log - The DrinkLoggerSpec to log error/etc messages to.username - The username of the account to authenticate.password - The password of the account to authenticate.hostname - The host IMAP server to use for authentication.port - The port on the IMAP server host to connect to.