The guice integration is an alternative mechanism for instantiating and confusing Shiro from the ini. The two are mutually exclusive. If you wish to use the Shiro security manager in guice but instantiate and configure Shiro via the ini then I'd recommend duplicating the ini instantiation inside a guice provider. On Feb 28, 2016 4:04 PM, "Lenny Primak" <[email protected]> wrote:
> If looks like your .ini file isn’t being read. > I suggest going into your code that tells Shiro to use your .ini file and > see if it’s really being executed. > > > On Feb 28, 2016, at 4:02 PM, jasmine <[email protected]> wrote: > > > > Update: > > > > I just thought I can define a second REALM > > > > protected void configureShiroWeb() { > > try { > > > > > > bindRealm().toConstructor(IniRealm.class.getConstructor(Ini.class)); > > bindRealm().toConstructor(MyADRealm.class.getConstructor()); > > } > > > > but at the starting of my webapp I get > > ...realm.ldap.AbstractLdapRealm - No LdapContextFactory specified - > creating > > a default instance > > > > so where shiro try to authenticate against MyADRealm I get: > > > > java.lang.IllegalStateException: An LDAP URL must be specified of the > form > > ldap://<hostname>:<port> > > > > How can I initialize a LdapContextFactory? It's ignoring the one in my > ini > > file... > > > > Some idea? > > > > > > > > -- > > View this message in context: > http://shiro-user.582556.n2.nabble.com/Shiro-Guice-tp7580965p7580966.html > > Sent from the Shiro User mailing list archive at Nabble.com. > > > >
