You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by Waypoint D <wa...@gmail.com> on 2014/10/20 15:48:00 UTC

Request help configuring IsisLdapRealm using Guice

Greetings,

       I am trying to build a webapp which uses apache shiro and
google guice.   I have been following a [1] tutorial, but cannot
determine how to configure with the realm class which I need to use.
Here is a snippet from the section of code where I need to make
changes (which has been edited for readability)...

file:BigBankShiroWebModule.java
    public class BigBankShiroWebModule extends ShiroWebModule {
        protected void configureShiroWeb() {
            bindRealm().toConstructor( IniRealm.class.getConstructor(
Ini.class ) );
        }
        Ini loadShiroIni() {
            return Ini.fromResourcePath( "classpath:shiro.ini" );
        }

I have tried to replace IniRealm with IsisLdapRealm or JndiLdapRealm
which will load the realm, but neither of these ldap realms will
execute the callback loadShiroIni.  I don't see how to apply my
configuration from shiro.ini to the binded realm?

Help is appreciated more than you know!
- John

Web link appendix
   [1] Add an example for using Guice integration.
   https://issues.apache.org/jira/browse/SHIRO-320