private Authenticator buildAuthenticator() {
Authenticator authenticator;
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) {
authenticator = new FormAuthenticator(loginPage, errorPage, true);
} else if (authMethod == BuiltInAuthMethod.NONE) {