* Default no-argument constructor that defaults the internal {@link LdapContextFactory} instance to a
* {@link JndiLdapContextFactory}.
*/
public JndiLdapRealm() {
//Credentials Matching is not necessary - the LDAP directory will do it automatically:
setCredentialsMatcher(new AllowAllCredentialsMatcher());
//Any Object principal and Object credentials may be passed to the LDAP provider, so accept any token:
setAuthenticationTokenClass(AuthenticationToken.class);
this.contextFactory = new JndiLdapContextFactory();
}