UserSecurityHandler ldapUsh = new LdapUserSecurityHandler();
// The LDAP credential handler.
CredentialHandler ldapCh = new LdapCredentialHandler();
// Security Providers.
AuthenticationProvider defaultAtnProvider = new AuthenticationProviderImpl("DefaultAuthenticator", "The default authenticator", "login.conf", ch, ush);
AuthenticationProvider ldapAtnProvider = new AuthenticationProviderImpl("LdapAuthenticator", "The ldap authenticator", ldapCh, ldapUsh);
List atnProviders = new ArrayList();
atnProviders.add(defaultAtnProvider);
atnProviders.add(ldapAtnProvider);
AuthenticationProviderProxy atnProviderProxy = new AuthenticationProviderProxyImpl(atnProviders, "DefaultAuthenticator");