if (authMethod == BuiltInAuthMethod.BASIC) {
authenticator = new BasicAuthenticator();
} else if (authMethod == BuiltInAuthMethod.DIGEST) {
authenticator = new DigestAuthenticator();
} else if (authMethod == BuiltInAuthMethod.CLIENTCERT) {
authenticator = new ClientCertAuthenticator();
} else if (authMethod == BuiltInAuthMethod.FORM) {
boolean dispatch = true;
authenticator = new FormAuthenticator(loginPage, errorPage, dispatch);
} else if (authMethod == BuiltInAuthMethod.NONE) {
authenticator = new NoneAuthenticator();