001/** 002 * Copyright 2005-2014 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.kim.client.acegi; 017 018import org.acegisecurity.AuthenticationException; 019import org.acegisecurity.providers.cas.CasAuthoritiesPopulator; 020import org.acegisecurity.userdetails.UserDetails; 021 022 023/** 024 * Populates the <code>UserDetails</code> associated with a CAS authenticated 025 * CAS ticket response. 026 * 027 * <p> 028 * Kuali authentication expects a formated response from CAS that includes 029 * The username and the authentication method (as an attribute). At this time 030 * The authentication method is stored as a <code>GrantedAuthority</code> 031 * </p> 032 * 033 * <p> 034 * Implementations should not perform any caching. They will only be called 035 * when a refresh is required. 036 * </p> 037 * 038 * @author Kuali Rice Team (rice.collab@kuali.org) 039*/ 040public interface KualiCasAuthoritiesPopulator extends CasAuthoritiesPopulator { 041 //~ Methods ======================================================================================================== 042 043 /** 044 * Obtains the granted authorities for the specified user.<P>May throw any 045 * <code>AuthenticationException</code> or return <code>null</code> if the authorities are unavailable.</p> 046 * 047 * @param casUserId as obtained from the CAS validation service 048 * 049 * @return the details of the indicated user (at minimum the granted authorities and the username) 050 * 051 * @throws AuthenticationException DOCUMENT ME! 052 */ 053 UserDetails getUserDetails(KualiTicketResponse response) 054 throws AuthenticationException; 055}