1
2
3
4
5
6
7
8
9
10
11 package ch.qos.logback.core.net;
12
13 import javax.mail.Authenticator;
14 import javax.mail.PasswordAuthentication;
15
16 public class LoginAuthenticator extends Authenticator {
17
18 String username;
19 String password;
20
21 LoginAuthenticator(String username, String password) {
22 this.username = username;
23 this.password = password;
24 }
25
26 public PasswordAuthentication getPasswordAuthentication() {
27 return new PasswordAuthentication(username, password);
28 }
29
30 }