Map options = new HashMap();
// TODO: This can be a bad thing, passing a reference to a realm to the login module
// since the SerializableACE can be sent remotely
options.put(REALM_INSTANCE, this);
JaasLoginModuleConfiguration config = new JaasLoginModuleConfiguration(PasswordCredentialLoginModule.class.getName(),
LoginModuleControlFlag.REQUISITE, options, true, getRealmName());
return new JaasLoginModuleConfiguration[]{config};
}