1 /*
2 * Copyright 2007-2008 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
17 package org.kuali.rice.kim.client.acegi;
18
19 import org.acegisecurity.AuthenticationException;
20 import org.acegisecurity.providers.cas.CasAuthoritiesPopulator;
21 import org.acegisecurity.userdetails.UserDetails;
22
23
24 /**
25 * Populates the <code>UserDetails</code> associated with a CAS authenticated
26 * CAS ticket response.
27 *
28 * <p>
29 * Kuali authentication expects a formated response from CAS that includes
30 * The username and the authentication method (as an attribute). At this time
31 * The authentication method is stored as a <code>GrantedAuthority</code>
32 * </p>
33 *
34 * <p>
35 * Implementations should not perform any caching. They will only be called
36 * when a refresh is required.
37 * </p>
38 *
39 * @author Kuali Rice Team (rice.collab@kuali.org)
40 */
41 public interface KualiCasAuthoritiesPopulator extends CasAuthoritiesPopulator {
42 //~ Methods ========================================================================================================
43
44 /**
45 * Obtains the granted authorities for the specified user.<P>May throw any
46 * <code>AuthenticationException</code> or return <code>null</code> if the authorities are unavailable.</p>
47 *
48 * @param casUserId as obtained from the CAS validation service
49 *
50 * @return the details of the indicated user (at minimum the granted authorities and the username)
51 *
52 * @throws AuthenticationException DOCUMENT ME!
53 */
54 UserDetails getUserDetails(KualiTicketResponse response)
55 throws AuthenticationException;
56 }