1 | |
package com.nilhcem.fakesmtp.server; |
2 | |
|
3 | |
import java.util.ArrayList; |
4 | |
import java.util.List; |
5 | |
import org.subethamail.smtp.AuthenticationHandler; |
6 | |
import org.subethamail.smtp.AuthenticationHandlerFactory; |
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | 1 | final class SMTPAuthHandlerFactory implements AuthenticationHandlerFactory { |
15 | |
private static final String LOGIN_MECHANISM = "LOGIN"; |
16 | |
|
17 | |
@Override |
18 | |
public AuthenticationHandler create() { |
19 | 0 | return new SMTPAuthHandler(); |
20 | |
} |
21 | |
|
22 | |
@Override |
23 | |
public List<String> getAuthenticationMechanisms() { |
24 | 0 | List<String> result = new ArrayList<String>(); |
25 | 0 | result.add(SMTPAuthHandlerFactory.LOGIN_MECHANISM); |
26 | 0 | return result; |
27 | |
} |
28 | |
} |