Hi,
Im trying to use a realmFactory to register a realm.
The config is quite simple:
[main]
realmFactory = se.example.init.MyRealmFactory
authc.loginUrl = /
After debugging the problem I stumbled upon the following lines in
org.apache.shiro.config.IniSecurityManagerFactory (Line 173 in version
1.1.0)
private void addToRealms(Collection<Realm> realms, RealmFactory factory) {
LifecycleUtils.init(factory);
Collection<Realm> factoryRealms = factory.getRealms();
if (!CollectionUtils.isEmpty(realms)) {
realms.addAll(factoryRealms);
}
}
Of particular interest is the
if (!CollectionUtils.isEmpty(realms))
line.
How come the realms defined in my factory should not be added unless there
already exists defined realms?
Best regards
Jonas
--
View this message in context:
http://shiro-user.582556.n2.nabble.com/RealmFactory-not-working-properly-tp5855695p5855695.html
Sent from the Shiro User mailing list archive at Nabble.com.