
org.subethamail.smtp.auth.EasyAuthenticationHandlerFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of subethasmtp Show documentation
Show all versions of subethasmtp Show documentation
A fork of a fork (!) of SubEtha, an easy-to-use server-side SMTP library for Java.
package org.subethamail.smtp.auth;
/**
* This a convenient class that saves you setting up the factories that we know
* about; you can always add more afterwards. Currently this factory supports:
*
* PLAIN LOGIN
*
* @author Jeff Schnitzer
*/
public final class EasyAuthenticationHandlerFactory extends MultipleAuthenticationHandlerFactory
{
/** Just hold on to this so that the caller can get it later, if necessary */
private final UsernamePasswordValidator validator;
public EasyAuthenticationHandlerFactory(UsernamePasswordValidator validator)
{
this.validator = validator;
this.addFactory(new PlainAuthenticationHandlerFactory(this.validator));
this.addFactory(new LoginAuthenticationHandlerFactory(this.validator));
}
public UsernamePasswordValidator getValidator()
{
return this.validator;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy