Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.1.0
-
None
Description
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))
}
Changing
if (!CollectionUtils.isEmpty(realms)) {
to
if (!CollectionUtils.isEmpty(factoryRealms)) {
solves the problem.