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