2 realm were configured. To answer your question... it is 
ExtendedPropertiesRealm that is associated with the principle configured... 
which is wrong... it should be HibernateUserRealm which is lost... or clobbered 
?

Here is where I configure my realms inside AppModule.JAVA

    public static void contributeWebSecurityManager(Configuration<Realm> 
configuration, Authenticator authenticator,
            WebSecurityManager securityManager, SecurityAuthenticationListener 
pphlAuthenticationListener,
            @InjectService("HibernateUserRealm") AuthenticatingRealm 
hibernateUserRealm)
    {
        configuration.add(hibernateUserRealm);

        // doesn't necessarily belong here, but we can just as well set up the 
listener here
        authenticator.addAuthenticationListener(pphlAuthenticationListener);

        ExtendedPropertiesRealm defaultShiroRealm = new 
ExtendedPropertiesRealm("classpath:shiro.properties");
        defaultShiroRealm.setName("default");

        /**
         * do default shiro.ini There are annoying two little bugs.. 1)
         * TextConfigurationRealm creates simpleaccountinfo map at start-up but
         * doesn't refresh the realm name when it's changed and 2)
         * 
         * ExtendedPropertiesRealm doesn't take name as a constructor parameter.
         * So need to do some trickery to set the name before the configuration
         * is loaded
         */
        configuration.add(defaultShiroRealm);
    }
                                          

Reply via email to