shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Les Hazlewood (Closed) (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (SHIRO-238) RealmFactory not working properly
Date Tue, 24 Jan 2012 19:24:42 GMT

     [ https://issues.apache.org/jira/browse/SHIRO-238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Les Hazlewood closed SHIRO-238.
-------------------------------

    Resolution: Fixed
    
> RealmFactory not working properly
> ---------------------------------
>
>                 Key: SHIRO-238
>                 URL: https://issues.apache.org/jira/browse/SHIRO-238
>             Project: Shiro
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 1.1.0
>            Reporter: jontro
>            Assignee: Les Hazlewood
>             Fix For: 1.2.0
>
>
> 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)) { 
>             realms.addAll(factoryRealms); 
>         } 
> } 
> Changing 
> if (!CollectionUtils.isEmpty(realms)) { 
> to
> if (!CollectionUtils.isEmpty(factoryRealms)) { 
> solves the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message