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