View Javadoc

1   /* Copyright 2004 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.providers.cas.proxy;
17  
18  import org.acegisecurity.providers.cas.CasProxyDecider;
19  import org.acegisecurity.providers.cas.ProxyUntrustedException;
20  
21  import org.apache.commons.logging.Log;
22  import org.apache.commons.logging.LogFactory;
23  import org.springframework.util.Assert;
24  
25  import java.util.List;
26  
27  
28  /***
29   * Accepts a proxied request from any other service.
30   * 
31   * <P>
32   * Also accepts the request if there was no proxy (ie the user directly
33   * authenticated against this service).
34   * </p>
35   *
36   * @author Ben Alex
37   * @version $Id: AcceptAnyCasProxy.java,v 1.3 2005/11/17 00:56:08 benalex Exp $
38   */
39  public class AcceptAnyCasProxy implements CasProxyDecider {
40      //~ Static fields/initializers =============================================
41  
42      private static final Log logger = LogFactory.getLog(AcceptAnyCasProxy.class);
43  
44      //~ Methods ================================================================
45  
46      public void confirmProxyListTrusted(List proxyList)
47          throws ProxyUntrustedException {
48          Assert.notNull(proxyList, "proxyList cannot be null");
49  
50          if (logger.isDebugEnabled()) {
51              logger.debug("Always accepting proxy list: " + proxyList.toString());
52          }
53      }
54  }