1 /* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 package org.acegisecurity.ldap;
17
18 import org.acegisecurity.userdetails.ldap.LdapUserDetails;
19
20
21 /**
22 * Obtains a user's information from the LDAP directory given a login name.
23 * <p>
24 * May be optionally used to configure the LDAP authentication implementation when
25 * a more sophisticated approach is required than just using a simple username->DN
26 * mapping.
27 * </p>
28 *
29 * @author Luke Taylor
30 * @version $Id: LdapUserSearch.java 1496 2006-05-23 13:38:33Z benalex $
31 */
32 public interface LdapUserSearch {
33 //~ Methods ========================================================================================================
34
35 /**
36 * Locates a single user in the directory and returns the LDAP information for that user.
37 *
38 * @param username the login name supplied to the authentication service.
39 *
40 * @return an LdapUserDetailsImpl object containing the user's full DN and requested attributes.
41 */
42 LdapUserDetails searchForUser(String username);
43 }