Response inline On Sun, Sep 25, 2016 at 5:12 PM, opticyclic <[email protected]> wrote:
> I'm a little bit confused by the naming conventions in the class hierarchy > I > see in Shiro. > > For instance: > public interface WebEnvironment extends Environment > > However: > > public class DefaultWebEnvironment extends DefaultEnvironment > - DefaultEnvironment implements NamedObjectEnvironment > - NamedObjectEnvironment extends Environment > > Why does DefaultWebEnvironment not implement WebEnvironment? > If they are fundamentally different, shouldn't they be named differently? > DefaultWebEnvironment extends DefaultEnvironment implements MutableWebEnvironment and MutableWebEnvironment implements WebEnvironment > > Another example: > public class ActiveDirectoryRealm extends AbstractLdapRealm > - AbstractLdapRealm extends AuthorizingRealm > > However: > public class DefaultLdapRealm extends AuthorizingRealm > > Why does DefaultLdapRealm not extend AbstractLdapRealm? > > If DefaultLdapRealm extended AbstractLdapRealm then ActiveDirectoryRealm > could extend DefaultLdapRealm, which would make sense as the code is > treating it as a superset of LDAP. > i.e. it has specific queries for logging in, getting groups/roles etc. > I agree, and I've opened https://issues.apache.org/jira/browse/SHIRO-588 > > Also, ActiveDirectoryRealm is in a package parallel to the ldap package. > Since it extends org.apache.shiro.realm.ldap.AbstractLdapRealm, surely it > would make sense for it to either be in the org.apache.shiro.realm.ldap > package or in the org.apache.shiro.realm.ldap.activedirectory package. > I don't disagree with this, but, technically there are multiple ways to connect to an AD server, LDAP is just one of those ways. Since Shiro's default implementation uses LDAP. I understand your point. If we added another AD Realm that used a different (non-LDAP) connector, the current package structure fits. And of course moving or renaming is confusing, as we would end up with a deprecated realm.activedirectory.ActiveDirectoryRealm and a realm.ldap.ActiveDirectoryRealm (at least until 2.0) Other thoughts? > > > > > -- > View this message in context: http://shiro-user.582556.n2. > nabble.com/Confused-By-Class-Hierarchy-tp7581289.html > Sent from the Shiro User mailing list archive at Nabble.com. >
