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 final class SMTPAuthHandlerFactory implements AuthenticationHandlerFactory {
15 private static final String LOGIN_MECHANISM = "LOGIN";
16
17 @Override
18 public AuthenticationHandler create() {
19 return new SMTPAuthHandler();
20 }
21
22 @Override
23 public List<String> getAuthenticationMechanisms() {
24 List<String> result = new ArrayList<String>();
25 result.add(SMTPAuthHandlerFactory.LOGIN_MECHANISM);
26 return result;
27 }
28 }