I've got an issue regarding Shiro iniRealm and CredentialMatcher. I'm creating a securityManager with an ini file. In that Ini file, in the main section, I'm putting that :
I'm trying to attach my own credential matcher to the default iniRealm.Then I do :
Factory factory = new IniSecurityManagerFactory(ini);
securityManager = factory.getInstance();
and this warning is thrown :
org.apache.shiro.realm.text.IniRealm - Users or Roles are already populated.
Configured Ini instance will be ignored.
If I did a little bit in the source code, I can see that in buildObjects method of ReflectionBuilder.java, we
first process the kvPairs and then initialize the objects with :
//SHIRO-413:init method must be called for constructed objects that are Initializable
But in the execute method of BeanConfigurationProcessor, the iniRealm is also initialized because the Pair "iniRealm.credentialsMatcher", "$NellMatcher" is being processed.
Therefore, iniRealm is initialized and the call to "
LifecycleUtils.init(objects.values());" tries to re-init the iniRealm again,
thus throwing the warning.
Is this a bug or am I missing something ?
Any helpis appreciated,