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

prompto.security.auth.method.BasicAuthenticationMethodFactory Maven / Gradle / Ivy

There is a newer version: 0.1.57
Show newest version
package prompto.security.auth.method;

import org.eclipse.jetty.security.Authenticator;
import org.eclipse.jetty.security.authentication.BasicAuthenticator;

import prompto.config.IConfigurationReader;
import prompto.config.auth.method.IAuthenticationMethodConfiguration;

public class BasicAuthenticationMethodFactory implements IAuthenticationMethodFactory {

	@Override
	public IAuthenticationMethodConfiguration newConfiguration(IConfigurationReader reader) {
		return null; // no config
	}

	@Override
	public void setConfiguration(IAuthenticationMethodConfiguration config) {
		// nothing to do
	}

	@Override
	public Authenticator newAuthenticator(boolean withXAuthorization) {
		if(withXAuthorization)
			return new BasicAuthenticatorWithXAuthorization();
		else
			return new BasicAuthenticator();
	}

	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy