Issue Details (XML | Word | Printable)

Key: DIRSERVER-365
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Trustin Lee
Reporter: Giamma
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Directory ApacheDS

Custom authenticator is never called

Created: 06/Jul/05 07:16 AM   Updated: 21/Apr/07 11:13 AM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Resolution Date: 12/Aug/05 04:50 PM


 Description  « Hide
I wrote a custom authenticator that will authenticate against our database.
The problem is that it's never called in AuthenticationService.process().

It looks like process() will loop through the configured authenticator, starting with the default one:

  for (Iterator i = authenticators.iterator(); i.hasNext(); idx++) {
            try {
                Authenticator authenticator = (Authenticator) i.next();

                // perform the authentication

                LdapPrincipal authorizationId = authenticator.authenticate(ctx);

                .....
             }
 }

Unfortunately SimpleAuthenticator will generate a LdapNameNotFoundException exception and process() will just bail out.
Instead it should try the next authenticator.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Alex Karasulu added a comment - 12/Aug/05 12:15 AM
It might be a good idea to get Endi's commentary on this issue.

Endi S. Dewata added a comment - 12/Aug/05 01:20 AM
Hi, I can't find the process() method in AuthenticationService. Maybe it's from an older code?

In the current code the work is done in AuthenticationService.authenticate(). The way it works is it will attempt to authenticate using each authenticator. If one fails, it will try the next one until it finds the first authenticator that doesn't throw an exception. If all authenticators fail, the authenticate() method itself will throw an LdapAuthenticationException. Hope this helps.

Endi

Trustin Lee added a comment - 12/Aug/05 04:50 PM
I checked in the fix. Now it should work as you expected.

Emmanuel Lecharny added a comment - 21/Apr/07 11:13 AM
Closing all issues created in 2005 and before which are marked resolved