org.apache.commons.mail
Class DefaultAuthenticator
java.lang.Object
javax.mail.Authenticator
org.apache.commons.mail.DefaultAuthenticator
- public class DefaultAuthenticator
- extends javax.mail.Authenticator
This is a very simple authentication object that can be used for any
transport needing basic userName and password type authentication.
- Since:
- 1.0
- Version:
- $Id: DefaultAuthenticator.java 225600 2005-07-27 20:16:23Z rdonkin $
- Author:
- Quinton McCombs
Field Summary |
private javax.mail.PasswordAuthentication |
authentication
Stores the login information for authentication |
Fields inherited from class javax.mail.Authenticator |
|
Constructor Summary |
DefaultAuthenticator(java.lang.String userName,
java.lang.String password)
Default constructor |
Method Summary |
protected javax.mail.PasswordAuthentication |
getPasswordAuthentication()
Gets the authentication object that will be used to login to the mail
server. |
Methods inherited from class javax.mail.Authenticator |
getDefaultUserName, getRequestingPort, getRequestingPrompt, getRequestingProtocol, getRequestingSite |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
authentication
private javax.mail.PasswordAuthentication authentication
- Stores the login information for authentication
DefaultAuthenticator
public DefaultAuthenticator(java.lang.String userName,
java.lang.String password)
- Default constructor
- Parameters:
userName
- user name to use when authentication is requestedpassword
- password to use when authentication is requested- Since:
- 1.0
getPasswordAuthentication
protected javax.mail.PasswordAuthentication getPasswordAuthentication()
- Gets the authentication object that will be used to login to the mail
server.
- Returns:
- A
PasswordAuthentication
object containing the
login information. - Since:
- 1.0