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

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

There is a newer version: 3.1.7
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 class EasyAuthenticationHandlerFactory extends MultipleAuthenticationHandlerFactory
{
	/** Just hold on to this so that the caller can get it later, if necessary */
	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 - 2024 Weber Informatics LLC | Privacy Policy