import javax.mail.PasswordAuthentication;
/**
- * Authenticator to supply username and password to the mail server
- * (if needed).
- *
+ * Authenticator to supply username and password to the mail server (if needed).
+ *
*/
public class UsernamePasswordAuthenticator extends Authenticator {
-
- private String _username;
- private String _password;
+
+ private String _username;
+
+ private String _password;
/**
* Constructs the authenticator.
- * @param aUsername User name.
- * @param aPassword Password.
+ *
+ * @param aUsername
+ * User name.
+ * @param aPassword
+ * Password.
*/
- public UsernamePasswordAuthenticator(String aUsername, String aPassword) {
- _username = aUsername;
- _password = aPassword;
+ public UsernamePasswordAuthenticator(String aUsername, String aPassword) {
+ _username = aUsername;
+ _password = aPassword;
}
-
+
/*
- * (non-Javadoc)
+ * (non-Javadoc)
+ *
* @see javax.mail.Authenticator#getPasswordAuthentication()
*/
@Override
- protected PasswordAuthentication getPasswordAuthentication( ) {
- if ( _username == null ) {
- return null;
+ protected PasswordAuthentication getPasswordAuthentication() {
+ if (_username == null) {
+ return null;
}
return new PasswordAuthentication(_username, _password);
}