Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
KualiUserDetailsService |
|
| 1.0;1 |
1 | /** | |
2 | * Copyright 2005-2011 The Kuali Foundation | |
3 | * | |
4 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.opensource.org/licenses/ecl2.php | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | */ | |
16 | package org.kuali.rice.kim.client.acegi; | |
17 | ||
18 | import org.acegisecurity.providers.dao.DaoAuthenticationProvider; | |
19 | import org.acegisecurity.userdetails.UserDetails; | |
20 | import org.acegisecurity.userdetails.UserDetailsService; | |
21 | import org.acegisecurity.userdetails.UsernameNotFoundException; | |
22 | import org.springframework.dao.DataAccessException; | |
23 | ||
24 | ||
25 | /** | |
26 | * Defines an interface for implementations that wish to provide data | |
27 | * access services to the {@link DaoAuthenticationProvider}. | |
28 | * | |
29 | * <p> | |
30 | * Kuali Requires CAS to provide the <code>Authentication Source</code> so | |
31 | * a method is require to get user based on the <code>response</code> | |
32 | * object </p> | |
33 | * | |
34 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
35 | * | |
36 | */ | |
37 | public interface KualiUserDetailsService extends UserDetailsService { | |
38 | //~ Methods ======================================================================================================== | |
39 | ||
40 | /** | |
41 | * Locates the user based on the response. In the actual implementation, the search may possibly be case | |
42 | * insensitive, or case insensitive depending on how the implementaion instance is configured. In this case, the | |
43 | * <code>UserDetails</code> object that comes back may have a username that is of a different case than what was | |
44 | * actually requested. Also populates the <code>Authentication Source</code> as a <code>GrantedAuthority</code> | |
45 | * | |
46 | * @param response the reponse from the TicketValidator presented to the {@link DaoAuthenticationProvider} | |
47 | * | |
48 | * @return a fully populated user record (never <code>null</code>) | |
49 | * | |
50 | * @throws UsernameNotFoundException if the user could not be found or the user has no GrantedAuthority | |
51 | * @throws DataAccessException if user could not be found for a repository-specific reason | |
52 | */ | |
53 | UserDetails loadUserByTicketResponse(KualiTicketResponse response) | |
54 | throws UsernameNotFoundException, DataAccessException; | |
55 | } |