if (loginConfig != null || deploymentInfo.getJaspiAuthenticationMechanism() != null) {
List<AuthenticationMechanism> authenticationMechanisms = new LinkedList<AuthenticationMechanism>();
authenticationMechanisms.add(new CachedAuthenticatedSessionMechanism()); //TODO: does this really need to be hard coded?
//we don't allow multipart requests, and always use the default encoding
FormParserFactory parser = FormParserFactory.builder(false)
.addParser(new FormEncodedDataDefinition().setDefaultEncoding(deploymentInfo.getDefaultEncoding()))
.build();
List<AuthMethodConfig> authMethods = Collections.<AuthMethodConfig>emptyList();
if(loginConfig != null) {