blob: 84397d5f71c53c80d72659e47864248c9c604ac4 [file] [log] [blame]
package de.ids_mannheim.korap.service;
import jakarta.mail.Authenticator;
import jakarta.mail.PasswordAuthentication;
/** Defines Authenticator for creating javax.mail.Session.
*
* @see src/main/resources/default-config.xml
*
* @author margaretha
*
*/
public class MailAuthenticator extends Authenticator {
private PasswordAuthentication passwordAuthentication;
public MailAuthenticator (String username, String password) {
passwordAuthentication = new PasswordAuthentication(username, password);
}
@Override
protected PasswordAuthentication getPasswordAuthentication () {
return passwordAuthentication;
}
}