harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deven You <devyo...@gmail.com>
Subject Re: [classlib][auth] JndiLoginModule
Date Thu, 15 Apr 2010 07:03:21 GMT
Hi Mark,
I just notice that JndiLoginModuleTest.java contains below statements:

    private final String USER_PROVIDER_URL = "ldap://" +
LDAP_SERVER_LOCATION
            + ":389/ou=People,o=JNDITutorial,dc=my-domain,dc=com";

    private final String GROUP_PROVIDER_URL = "ldap://" +
LDAP_SERVER_LOCATION
            + ":389/ou=Groups,o=JNDITutorial,dc=my-domain,dc=com";

    protected void setUp() throws Exception {
        options.put("user.provider.url", USER_PROVIDER_URL);
        options.put("group.provider.url", GROUP_PROVIDER_URL);
    }

So what I can guess is that:
1. for your item 2, the JndiLoginModule.java is mistaken, the order should
be reversed according to the JndiLoginModuleTest.java.
2. the usage of these 2 seems as keys for a property list. however I have
searched the harmony trunk with the first version of JndiLoginModule and
with the latest version of svn. Both show there is not any reference to
these 2 fields.
So I think it is safe to remove these 2 fields. Thanks a lot!
2010/3/24 Mark Hindess <mark.hindess@googlemail.com>

>
> modules/auth/src/main/java/common/org/.../auth/module/JndiLoginModule.java
> contains fields:
>
>    public final String USER_PROVIDER = "group.provider.url";
>
>    public final String GROUP_PROVIDER = "user.provider.url";
>
> I wonder why:
>
> 1) they are not static?
>
> 2) USER_PROVIDER contains 'group' and GROUP_PROVIDER contains 'user'?
>
> 3) they aren't used to replace the occurrences of these strings in the
>   code (of course, the previous item might make this confusing)?
>
> Anyone know if there are any reasons not to fix any of the above?
> I'd attempt some obvious fixes to the above but I don't understand the
> context in which this class is used and was too confused to do this
> without sanity checking.
>
> Regards,
>  Mark.
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message