All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.subethamail.smtp.auth.EasyAuthenticationHandlerFactory Maven / Gradle / Ivy

Go to download

A fork of a fork (!) of SubEtha, an easy-to-use server-side SMTP library for Java.

There is a newer version: 7.1.3
Show newest version
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