You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by "jontro (JIRA)" <ji...@apache.org> on 2011/01/17 12:45:44 UTC

[jira] Created: (SHIRO-238) RealmFactory not working properly

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


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.
-
You can reply to this email to add a comment to the issue online.


[jira] [Updated] (SHIRO-238) RealmFactory not working properly

Posted by "Les Hazlewood (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHIRO-238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Les Hazlewood updated SHIRO-238:
--------------------------------

    Fix Version/s: 1.2.0
    
> 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

        

[jira] [Closed] (SHIRO-238) RealmFactory not working properly

Posted by "Les Hazlewood (Closed) (JIRA)" <ji...@apache.org>.
     [ 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

        

[jira] Resolved: (SHIRO-238) RealmFactory not working properly

Posted by "Les Hazlewood (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHIRO-238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Les Hazlewood resolved SHIRO-238.
---------------------------------

    Resolution: Fixed

Fix committed to trunk.  Thanks!

> 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
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (SHIRO-238) RealmFactory not working properly

Posted by "Les Hazlewood (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHIRO-238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Les Hazlewood reassigned SHIRO-238:
-----------------------------------

    Assignee: Les Hazlewood

> 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
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHIRO-238) RealmFactory not working properly

Posted by "Les Hazlewood (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHIRO-238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982897#action_12982897 ] 

Les Hazlewood commented on SHIRO-238:
-------------------------------------

Thanks for the issue and fix!

> 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
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] [Reopened] (SHIRO-238) RealmFactory not working properly

Posted by "Les Hazlewood (Reopened) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHIRO-238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Les Hazlewood reopened SHIRO-238:
---------------------------------

    
> 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