removed in prepration for new files
This commit is contained in:
Scott Battaglia 2007-10-24 20:04:05 +00:00
parent 5686f256d6
commit 5b4154dd48
96 changed files with 0 additions and 7675 deletions

View File

@ -1,29 +0,0 @@
License for Use
Copyright (c) 2000 The JA-SIG Collaborative. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Redistributions of any form whatsoever must retain the following
acknowledgment:
"This product includes software developed by the JA-SIG Collaborative
(http://www.ja-sig.org/)."
This software is provided by the JA-SIG collaborative "as is" and any expressed
or implied warranties, including, but not limited to, the implied warranties of
merchantability and fitness for a particular purpose are disclaimed. In no
event shall the JA-SIG collaborative or its contributors be liable for any
direct, indirect, incidental, special, exemplary, or consequential damages
(including, but not limited to, procurement of substitute goods or services;
loss of use, data, or profits; or business interruption) however caused and on
any theory of liability, whether in contract, strict liability, or tort
(including negligence or otherwise) arising in any way out of the use of this
software, even if advised of the possibility of such damage.

View File

@ -1,28 +0,0 @@
CENTRAL AUTHENTICATION SERVICE (CAS)
--------------------------------------------------------------------
http://www.ja-sig.org/products/cas/
1. INTRODUCTION
The Central Authentication Service (CAS) is the standard mechanism by which web
applications should authenticate users. Any custom applications written benefit
from using CAS.
Note that CAS provides authentication; that is, it determines that your users
are who they say they are. CAS should not be viewed as an access-control system;
in particular, providers of applications that grant access to anyone who
possesses a NetID should understand that loose affiliates of an organization may
be granted NetIDs.
The JA-SIG CAS Client for Java is a support library for Java applications to communicate
with the CAS server.
2. RELEASE INFO
CAS requires J2SE 1.4 and J2EE1.3.
Release conents:
* "src/main/java" contains the Java source files for the framework
* "src/test/java" contains the Java source files for CAS's test suite

View File

@ -1,137 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4" relativePaths="false" type="JAVA_MODULE">
<component name="ModuleRootManager" />
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/target/classes" />
<exclude-output />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="jdk" jdkName="1.6" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/commons-codec/commons-codec/1.3/commons-codec-1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/org/springframework/spring-beans/2.0.2/spring-beans-2.0.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/org/springframework/spring-context/2.0.2/spring-context-2.0.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/org/jasig/cas/cas-server-core/3.1-m1/cas-server-core-3.1-m1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/org/springframework/spring-web/2.0.2/spring-web-2.0.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/commons-logging/commons-logging/1.1/commons-logging-1.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/org/springframework/spring-core/2.0.2/spring-core-2.0.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/commons-httpclient/commons-httpclient/3.0.1/commons-httpclient-3.0.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/org/springframework/spring-mock/2.0.2/spring-mock-2.0.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/org/opensaml/opensaml/1.1b/opensaml-1.1b.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntryProperties />
</component>
</module>

View File

@ -1,173 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.jasig.cas</groupId>
<version>3.1-m1</version>
<artifactId>cas-client</artifactId>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jasig.cas</groupId>
<artifactId>cas-client-core</artifactId>
<packaging>jar</packaging>
<name>JA-SIG CAS Client for Java - Core</name>
<version>3.1-m1</version>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>false</filtering>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.4</source>
<target>1.4</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*Tests*</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clover-plugin</artifactId>
<configuration>
<licenseLocation>${basedir}/src/test/clover/clover.license</licenseLocation>
</configuration>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>instrument</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.0.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient-contrib</artifactId>
<version>3.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>2.0.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>2.0.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-mock</artifactId>
<version>2.0.2</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-dao</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-jpa</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>xml-security</groupId>
<artifactId>xmlsec</artifactId>
<version>1.3.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.opensaml</groupId>
<artifactId>opensaml</artifactId>
<version>1.1b</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
</dependencies>
<reporting>
<excludeDefaults>false</excludeDefaults>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clover-plugin</artifactId>
<configuration>
<licenseLocation>${basedir}/src/test/clover/clover.license</licenseLocation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<minmemory>128m</minmemory>
<maxmemory>512m</maxmemory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jdepend-maven-plugin</artifactId>
</plugin>
</plugins>
</reporting>
</project>

View File

@ -1,8 +0,0 @@
<settings>
<mirrors>
<mirrorOf>central</mirrorOf>
<name>JA-SIG Maven Repository</name>
<url>http://developer.ja-sig.org/maven/</url>
<id>jasig</id>
</mirrors>
</settings>

View File

@ -1,49 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.authorization;
/**
* Exception to be thrown if the user is not authorized to use the system.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class AuthorizationException extends RuntimeException {
/**
* Unique ID for serialization.
*/
private static final long serialVersionUID = 5912038088650643442L;
/**
* Constructs a new exception with the specified detail message and cause.
*
* @param message the detail message. The detail message is saved for later retrieval by the Throwable.getMessage() method.
* @param cause the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
*/
public AuthorizationException(final String message, final Throwable cause) {
super(message, cause);
}
/**
* Constructs a new exception with the specified detail message.
*
* @param message the detail message. The detail message is saved for later retrieval by the Throwable.getMessage() method.
*/
public AuthorizationException(final String message) {
super(message);
}
/**
* Constructs a new exception with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).
*
* @param cause the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
*/
public AuthorizationException(final Throwable cause) {
super(cause);
}
}

View File

@ -1,27 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.authorization;
import org.jasig.cas.authentication.principal.Principal;
/**
* Simple interface for determining whether a Principal is authorized to use the
* application or not.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public interface AuthorizedDecider {
/**
* Determines whether someone can use the system or not.
*
* @param principal the person we are checking
* @return true if authorized, false otherwise.
*/
boolean isAuthorizedToUseApplication(final Principal principal);
}

View File

@ -1,42 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.authorization;
import org.jasig.cas.authentication.principal.Principal;
import org.jasig.cas.client.util.CommonUtils;
import java.util.List;
/**
* Default implementation of the AuthorizedDecider that delegates to a list
* to check if someone is authorized.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class DefaultAuthorizedDeciderImpl implements
AuthorizedDecider {
/**
* The list of users authorized to use the system.
*/
private final List users;
/**
* Constructor that takes the list of acceptable users as its parameters.
*
* @param users the list of acceptable users.
*/
public DefaultAuthorizedDeciderImpl(final List users) {
CommonUtils.assertNotEmpty(users, "users cannot be empty.");
this.users = users;
}
public boolean isAuthorizedToUseApplication(final Principal principal) {
return this.users.contains(principal.getId());
}
}

View File

@ -1,10 +0,0 @@
<html>
<body>
<p>The authorization package contains the interface for a simple
abstraction for authorizing users to use an application. It is not a
complete role-based or access control authorization system.</p>
<p>For true authorization we recommend you look at the <a href="http://www.acegisecurity.org">Security for Spring</a>
project.</p>
</body>
</html>

View File

@ -1,108 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.proxy;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jasig.cas.client.util.CommonUtils;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* Implementation of an HttpServlet that accepts ProxyGrantingTicketIous and
* ProxyGrantingTickets and stores them in an implementation of
* {@link ProxyGrantingTicketStorage}.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public abstract class AbstractProxyReceptorServlet extends HttpServlet {
/**
* The name we expect the instance of ProxyGrantingTicketStorage to be
* instanciated under in the applicationContext.
*/
public static final String CONST_PROXY_GRANTING_TICKET_STORAGE_BEAN_NAME = "proxyGrantingTicketStorage";
/**
* Constant representing the ProxyGrantingTicket IOU Request Parameter.
*/
private static final String PARAM_PROXY_GRANTING_TICKET_IOU = "pgtIou";
/**
* Constant representing the ProxyGrantingTicket Request Parameter.
*/
private static final String PARAM_PROXY_GRANTING_TICKET = "pgtId";
/**
* Instance of ProxyGrantingTicketStorage to store ProxyGrantingTickets.
*/
private ProxyGrantingTicketStorage proxyGrantingTicketStorage;
/**
* Instance of Commons Logging
*/
protected final Log logger = LogFactory.getLog(this.getClass());
/**
* Unique Id for Serialization.
*/
private static final long serialVersionUID = 8766956323018042995L;
protected final void doGet(final HttpServletRequest request,
final HttpServletResponse response) throws ServletException,
IOException {
final String proxyGrantingTicketIou = request
.getParameter(PARAM_PROXY_GRANTING_TICKET_IOU);
final String proxyGrantingTicket = request
.getParameter(PARAM_PROXY_GRANTING_TICKET);
if (CommonUtils.isBlank(proxyGrantingTicket)
|| CommonUtils.isBlank(proxyGrantingTicketIou)) {
response.getWriter().write("");
return;
}
if (logger.isDebugEnabled()) {
logger.debug("Received proxyGrantingTicketId ["
+ proxyGrantingTicket + "] for proxyGrantingTicketIou ["
+ proxyGrantingTicketIou + "]");
}
this.proxyGrantingTicketStorage.save(proxyGrantingTicketIou,
proxyGrantingTicket);
response.getWriter().write("<?xml version=\"1.0\"?>");
response
.getWriter()
.write(
"<casClient:proxySuccess xmlns:casClient=\"http://www.yale.edu/tp/casClient\" />");
}
/**
* Delegates to the protected method <code>retrieveProxyGrantingTicketStorageFromConfiguration()</code>.
*/
public final void init(final ServletConfig servletConfig) throws ServletException {
this.proxyGrantingTicketStorage = retrieveProxyGrantingTicketStorageFromConfiguration(servletConfig);
}
/**
* Abstract class to retrieve the <code>ProxyGrantingTicketStorage</code> from the ServletConfig. Its up to
* implementing classes to figure out where they are initializing/retrieving the object from.
*
* @param servletConfig the Servlet Config that has access to the <code>ProxyGrantingTicketStorage</code>.
* @return the initialized <code>ProxyGrantingTicketStorage</code>.
* @throws ServletException if there is an exception retrieving the <code>ProxyGrantingTicketStorage</code>.
*/
protected abstract ProxyGrantingTicketStorage retrieveProxyGrantingTicketStorageFromConfiguration(final ServletConfig servletConfig) throws ServletException;
}

View File

@ -1,104 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.proxy;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jasig.cas.authentication.principal.Service;
import org.jasig.cas.client.util.CommonUtils;
import org.jasig.cas.client.util.XmlUtils;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
/**
* Implementation of a ProxyRetriever that follows the CAS 2.0 specification.
* For more information on the CAS 2.0 specification, please see the <a
* href="http://www.ja-sig.org/products/cas/overview/protocol/index.html">specification
* document</a>.
* <p/>
* In general, this class will make a call to the CAS server with some specified
* parameters and receive an XML response to parse.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class Cas20ProxyRetriever implements ProxyRetriever {
/**
* Instance of Commons Logging.
*/
protected final Log log = LogFactory.getLog(this.getClass());
/**
* Url to CAS server.
*/
private final String casServerUrl;
/**
* Instance of HttpClient for connecting to server.
*/
private final HttpClient httpClient;
/**
* Main Constructor.
*
* @param casServerUrl the URL to the CAS server (i.e. http://localhost/cas/)
* @param httpClient an Instance of a thread-safe HttpClient.
*/
public Cas20ProxyRetriever(final String casServerUrl, final HttpClient httpClient) {
CommonUtils.assertNotNull(casServerUrl,
"casServerUrl cannot be null.");
CommonUtils
.assertNotNull(httpClient, "httpClient cannot be null.");
this.casServerUrl = casServerUrl;
this.httpClient = httpClient;
}
public String getProxyTicketIdFor(final String proxyGrantingTicketId,
final Service targetService) {
final String url = constructUrl(proxyGrantingTicketId, targetService
.getId());
final GetMethod method = new GetMethod(url);
try {
this.httpClient.executeMethod(method);
final String response = method.getResponseBodyAsString();
final String error = XmlUtils.getTextForElement(response,
"proxyFailure");
if (CommonUtils.isNotEmpty(error)) {
log.debug(error);
return null;
}
return XmlUtils.getTextForElement(response, "proxyTicket");
} catch (IOException e) {
log.error(e, e);
return null;
} finally {
method.releaseConnection();
}
}
private String constructUrl(final String proxyGrantingTicketId,
final String targetService) {
try {
return this.casServerUrl + "proxy" + "?pgt="
+ proxyGrantingTicketId + "&targetService="
+ URLEncoder.encode(targetService, "UTF-8");
} catch (final UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
}
}

View File

@ -1,36 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.proxy;
/**
* Interface for the storage and retrieval of ProxyGrantingTicketIds by mapping
* them to a specific ProxyGrantingTicketIou.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public interface ProxyGrantingTicketStorage {
/**
* Method to save the ProxyGrantingTicket to the backing storage facility.
*
* @param proxyGrantingTicketIou used as the key
* @param proxyGrantingTicket used as the value
*/
public void save(String proxyGrantingTicketIou, String proxyGrantingTicket);
/**
* Method to retrieve a ProxyGrantingTicket based on the
* ProxyGrantingTicketIou. Note that implementations are not guaranteed to
* return the same result if retrieve is called twice with the same
* proxyGrantingTicketIou.
*
* @param proxyGrantingTicketIou used as the key
* @return the ProxyGrantingTicket Id or null if it can't be found
*/
public String retrieve(String proxyGrantingTicketIou);
}

View File

@ -1,142 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.proxy;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
/**
* Implementation of {@link ProxyGrantingTicketStorage} that is backed by a
* HashMap that keeps a ProxyGrantingTicket for a specified amount of time.
* <p/>
* A cleanup thread is run periodically to clean out the HashMap.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class ProxyGrantingTicketStorageImpl implements
ProxyGrantingTicketStorage {
/**
* Default timeout in milliseconds.
*/
private static final long DEFAULT_TIMEOUT = 60000;
private final Map cache = new HashMap();
/**
* Constructor set the timeout to the default value.
*/
public ProxyGrantingTicketStorageImpl() {
this(DEFAULT_TIMEOUT);
}
/**
* Sets the amount of time to hold on to a ProxyGrantingTicket if its never
* been retrieved.
*
* @param timeout the time to hold on to the ProxyGrantingTicket
*/
public ProxyGrantingTicketStorageImpl(final long timeout) {
final Thread thread = new ProxyGrantingTicketCleanupThread(
timeout, this.cache);
thread.setDaemon(true);
thread.start();
}
/**
* NOTE: you can only retrieve a ProxyGrantingTicket once with this method.
* Its removed after retrieval.
*/
public String retrieve(final String proxyGrantingTicketIou) {
final ProxyGrantingTicketHolder holder = (ProxyGrantingTicketHolder) this.cache
.get(proxyGrantingTicketIou);
if (holder == null) {
return null;
}
this.cache.remove(holder);
return holder.getProxyGrantingTicket();
}
public void save(final String proxyGrantingTicketIou,
final String proxyGrantingTicket) {
final ProxyGrantingTicketHolder holder = new ProxyGrantingTicketHolder(
proxyGrantingTicket);
this.cache.put(proxyGrantingTicketIou, holder);
}
private final class ProxyGrantingTicketHolder {
private final String proxyGrantingTicket;
private final long timeInserted;
protected ProxyGrantingTicketHolder(final String proxyGrantingTicket) {
this.proxyGrantingTicket = proxyGrantingTicket;
this.timeInserted = System.currentTimeMillis();
}
public String getProxyGrantingTicket() {
return this.proxyGrantingTicket;
}
final boolean isExpired(final long timeout) {
return System.currentTimeMillis() - this.timeInserted > timeout;
}
}
private final class ProxyGrantingTicketCleanupThread extends Thread {
private final long timeout;
private final Map cache;
public ProxyGrantingTicketCleanupThread(final long timeout,
final Map cache) {
this.timeout = timeout;
this.cache = cache;
}
public void run() {
while (true) {
try {
Thread.sleep(this.timeout);
} catch (final InterruptedException e) {
// nothing to do
}
final List itemsToRemove = new ArrayList();
synchronized (this.cache) {
for (final Iterator iter = this.cache.keySet().iterator(); iter
.hasNext();) {
final Object key = iter.next();
final ProxyGrantingTicketHolder holder = (ProxyGrantingTicketHolder) this.cache
.get(key);
if (holder.isExpired(this.timeout)) {
itemsToRemove.add(key);
}
}
for (final Iterator iter = itemsToRemove.iterator(); iter
.hasNext();) {
this.cache.remove(iter.next());
}
}
}
}
}
}

View File

@ -1,29 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.proxy;
import org.jasig.cas.authentication.principal.Service;
/**
* Interface to abstract the retrieval of a proxy ticket to make the
* implementation a black box to the client.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public interface ProxyRetriever {
/**
* Retrieves a proxy ticket for a specific targetService.
*
* @param proxyGrantingTicketId the ProxyGrantingTicketId
* @param targetService the service we want to proxy.
* @return the ProxyTicket Id if Granted, null otherwise.
*/
String getProxyTicketIdFor(String proxyGrantingTicketId,
Service targetService);
}

View File

@ -1,63 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.proxy;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import java.util.Map;
/**
* Implementation of an HttpServlet that accepts ProxyGrantingTicketIous and
* ProxyGrantingTickets and stores them in an implementation of
* {@link ProxyGrantingTicketStorage}.
* <p/>
* Note that <code>ProxyReceptorServlet</code> attempts to load a
* {@link ProxyGrantingTicketStorage} from the ApplicationContext either via the
* name "proxyGrantingTicketStorage" or by type. One of these two must exist
* within the applicationContext or the initialization of the
* ProxyReceptorServlet will fail.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class SpringConfiguredProxyReceptorServlet extends
AbstractProxyReceptorServlet {
/**
* Unique Id for serialization
*/
private static final long serialVersionUID = -5642050740265266568L;
protected ProxyGrantingTicketStorage retrieveProxyGrantingTicketStorageFromConfiguration(final ServletConfig servletConfig) throws ServletException {
final WebApplicationContext context = WebApplicationContextUtils
.getRequiredWebApplicationContext(servletConfig.getServletContext());
if (context.containsBean(CONST_PROXY_GRANTING_TICKET_STORAGE_BEAN_NAME)) {
return (ProxyGrantingTicketStorage) context
.getBean(CONST_PROXY_GRANTING_TICKET_STORAGE_BEAN_NAME,
ProxyGrantingTicketStorage.class);
}
final Map map = context
.getBeansOfType(ProxyGrantingTicketStorage.class);
if (map.isEmpty()) {
throw new ServletException("No ProxyGrantingTicketStorage found!");
}
if (map.size() > 1) {
throw new ServletException(
"Expecting one ProxyGrantingTicketStorage and found multiple instances.");
}
return (ProxyGrantingTicketStorage) map.get(map
.keySet().iterator().next());
}
}

View File

@ -1,7 +0,0 @@
<html>
<body>
<p>The proxy package includes a servlet to act as a proxy receptor,
an interface for ProxyGrantingTicketStorage and an abstraction for
retrieving proxy tickets.</p>
</body>
</html>

View File

@ -1,106 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.util;
import java.util.Collection;
/**
* Common utilities so that we don't need to include Commons Lang.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class CommonUtils {
private CommonUtils() {
// nothing to do
}
/**
* Check whether the object is null or not. If it is, throw an exception and
* display the message.
*
* @param object the object to check.
* @param message the message to display if the object is null.
*/
public static void assertNotNull(final Object object, final String message) {
if (object == null) {
throw new IllegalArgumentException(message);
}
}
/**
* Check whether the collection is null or empty. If it is, throw an
* exception and display the message.
*
* @param c the collecion to check.
* @param message the message to display if the object is null.
*/
public static void assertNotEmpty(final Collection c, final String message) {
assertNotNull(c, message);
if (c.isEmpty()) {
throw new IllegalArgumentException(message);
}
}
/**
* Assert that the statement is true, otherwise throw an exception with the
* provided message.
*
* @param cond the codition to assert is true.
* @param message the message to display if the condition is not true.
*/
public static void assertTrue(final boolean cond, final String message) {
if (!cond) {
throw new IllegalArgumentException(message);
}
}
/**
* Determines whether the String is null or of length 0.
*
* @param string the string to check
* @return true if its null or length of 0, false otherwise.
*/
public static boolean isEmpty(final String string) {
return string == null || string.length() == 0;
}
/**
* Determines if the String is not empty. A string is not empty if it is not
* null and has a length > 0.
*
* @param string the string to check
* @return true if it is not empty, false otherwise.
*/
public static boolean isNotEmpty(final String string) {
return !isEmpty(string);
}
/**
* Determines if a String is blank or not. A String is blank if its empty or
* if it only contains spaces.
*
* @param string the string to check
* @return true if its blank, false otherwise.
*/
public static boolean isBlank(final String string) {
return isEmpty(string) || string.trim().length() == 0;
}
/**
* Determines if a string is not blank. A string is not blank if it contains
* at least one non-whitespace character.
*
* @param string the string to check.
* @return true if its not blank, false otherwise.
*/
public static boolean isNotBlank(final String string) {
return !isBlank(string);
}
}

View File

@ -1,128 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.util;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import java.io.IOException;
import java.util.Iterator;
import java.util.Map;
/**
* A Delegating Filter looks up a parameter in the request object and matches
* (either exact or using Regular Expressions) the value. If there is a match,
* the associated filter is executed. Otherwise, the normal chain is executed.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class DelegatingFilter implements Filter {
/**
* Instance of Commons Logging.
*/
private final Log log = LogFactory.getLog(this.getClass());
/**
* The request parameter to look for in the Request object.
*/
private final String requestParameterName;
/**
* The map of filters to delegate to and the criteria (as key).
*/
private final Map delegators;
/**
* The default filter to use if there is no match.
*/
private final Filter defaultFilter;
/**
* Whether the key in the delegators map is an exact match or a regular
* expression.
*/
private final boolean exactMatch;
public DelegatingFilter(final String requestParameterName, final Map delegators, final boolean exactMatch) {
this(requestParameterName, delegators, exactMatch, null);
}
public DelegatingFilter(final String requestParameterName, final Map delegators, final boolean exactMatch, final Filter defaultFilter) {
CommonUtils.assertNotNull(requestParameterName,
"requestParameterName cannot be null.");
CommonUtils.assertTrue(!delegators.isEmpty(),
"delegators cannot be empty.");
for (final Iterator iter = delegators.keySet().iterator(); iter
.hasNext();) {
final Object object = delegators.get(iter.next());
if (!Filter.class.isAssignableFrom(object.getClass())) {
throw new IllegalArgumentException(
"All value objects in the delegators map must be filters.");
}
}
this.requestParameterName = requestParameterName;
this.delegators = delegators;
this.defaultFilter = defaultFilter;
this.exactMatch = exactMatch;
}
public void destroy() {
// nothing to do here
}
public void doFilter(final ServletRequest request,
final ServletResponse response, final FilterChain filterChain)
throws IOException, ServletException {
final String parameter = request
.getParameter(this.requestParameterName);
if (CommonUtils.isNotEmpty(parameter)) {
for (final Iterator iter = this.delegators.keySet().iterator(); iter
.hasNext();) {
final String key = (String) iter.next();
if ((parameter.equals(key) && this.exactMatch)
|| (parameter.matches(key) && !this.exactMatch)) {
final Filter filter = (Filter) this.delegators.get(key);
if (log.isDebugEnabled()) {
log.debug("Match found for parameter ["
+ this.requestParameterName + "] with value ["
+ parameter + "]. Delegating to filter ["
+ filter.getClass().getName() + "]");
}
filter.doFilter(request, response, filterChain);
return;
}
}
}
log.debug("No match found for parameter [" + this.requestParameterName
+ "] with value [" + parameter + "]");
if (this.defaultFilter != null) {
this.defaultFilter.doFilter(request, response, filterChain);
} else {
filterChain.doFilter(request, response);
}
}
public void init(final FilterConfig filterConfig) throws ServletException {
// nothing to do here.
}
}

View File

@ -1,158 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.util;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.DefaultHandler;
import org.xml.sax.helpers.XMLReaderFactory;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.List;
/**
* Common utilities for easily parsing XML without duplicating logic.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class XmlUtils {
/**
* Static instance of Commons Logging.
*/
private final static Log LOG = LogFactory.getLog(XmlUtils.class);
/**
* Get an instance of an XML reader from the XMLReaderFactory.
*
* @return the XMLReader.
*/
public static XMLReader getXmlReader() {
try {
return XMLReaderFactory.createXMLReader();
} catch (final SAXException e) {
throw new RuntimeException("Unable to create XMLReader", e);
}
}
/**
* Retrieve the text for a group of elements. Each text element is an entry
* in a list.
*
* @param xmlAsString the xml response
* @param element the element to look for
* @return the list of text from the elements.
*/
public static List getTextForElements(final String xmlAsString,
final String element) {
// XXX: optimized to 2, as most proxy chains have a length of no more than two
final List elements = new ArrayList(2);
final XMLReader reader = getXmlReader();
final DefaultHandler handler = new DefaultHandler() {
private boolean foundElement = false;
private StringBuffer buffer = new StringBuffer();
public void startElement(final String uri, final String localName,
final String qName, final Attributes attributes)
throws SAXException {
if (localName.equals(element)) {
this.foundElement = true;
}
}
public void endElement(final String uri, final String localName,
final String qName) throws SAXException {
if (localName.equals(element)) {
this.foundElement = false;
elements.add(this.buffer.toString());
this.buffer = new StringBuffer();
}
}
public void characters(char[] ch, int start, int length)
throws SAXException {
if (this.foundElement) {
this.buffer.append(ch, start, length);
}
}
};
reader.setContentHandler(handler);
reader.setErrorHandler(handler);
try {
reader.parse(new InputSource(new StringReader(xmlAsString)));
} catch (final Exception e) {
LOG.error(e, e);
return null;
}
return elements;
}
/**
* Retrieve the text for a specific element (when we know there is only
* one).
*
* @param xmlAsString the xml response
* @param element the element to look for
* @return the text value of the element.
*/
public static String getTextForElement(final String xmlAsString,
final String element) {
final XMLReader reader = getXmlReader();
final StringBuffer buffer = new StringBuffer();
final DefaultHandler handler = new DefaultHandler() {
private boolean foundElement = false;
public void startElement(final String uri, final String localName,
final String qName, final Attributes attributes)
throws SAXException {
if (localName.equals(element)) {
this.foundElement = true;
}
}
public void endElement(final String uri, final String localName,
final String qName) throws SAXException {
if (localName.equals(element)) {
this.foundElement = false;
}
}
public void characters(char[] ch, int start, int length)
throws SAXException {
if (this.foundElement) {
buffer.append(ch, start, length);
}
}
};
reader.setContentHandler(handler);
reader.setErrorHandler(handler);
try {
reader.parse(new InputSource(new StringReader(xmlAsString)));
} catch (final Exception e) {
LOG.error(e, e);
return null;
}
return buffer.toString();
}
}

View File

@ -1,5 +0,0 @@
<html>
<body>
<p>The validation package includes interfaces for validating Tickets, as well as the common implementations.</p>
</body>
</html>

View File

@ -1,118 +0,0 @@
package org.jasig.cas.client.validation;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jasig.cas.authentication.principal.Service;
import org.jasig.cas.client.util.CommonUtils;
import java.net.URLEncoder;
/**
* Abstract class for validating tickets that defines a workflow that all ticket
* validation should follow.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public abstract class AbstractUrlBasedTicketValidator implements
TicketValidator {
/**
* Instance of Commons Logging.
*/
protected final Log log = LogFactory.getLog(this.getClass());
/**
* Url to CAS server. Generally of the form https://server:port/cas/
*/
private final String casServerUrl;
/**
* Whether this client is looking for an authentication from renew.
*/
private final boolean renew;
/**
* Instance of HttpClient for connecting to server. Care should be taken only inject a multi-threaded HttpClient.
*/
private final HttpClient httpClient;
public final Assertion validate(final String ticketId, final Service service)
throws ValidationException {
final String url = constructURL(ticketId, service);
final String response = getResponseFromURL(url);
return parseResponse(response);
}
/**
* Constructs the URL endpoint for contacting CAS for ticket validation.
*
* @param ticketId the opaque ticket id.
* @param service the service we are validating for.
* @return the fully constructed url.
*/
protected abstract String constructURL(final String ticketId,
final Service service);
/**
* Parses the response retrieved from the url endpoint.
*
* @param response the String response.
* @return an Assertion based on the response.
* @throws ValidationException if there was an error validating the ticket.
*/
protected abstract Assertion parseResponse(final String response)
throws ValidationException;
private String getResponseFromURL(final String url)
throws ValidationException {
final GetMethod method = new GetMethod(url);
try {
this.httpClient.executeMethod(method);
return method.getResponseBodyAsString();
} catch (Exception e) {
log.error(e, e);
throw new ValidationException(
"Unable to retrieve response from CAS Server.", e);
} finally {
method.releaseConnection();
}
}
protected AbstractUrlBasedTicketValidator(final String casServerUrl, final boolean renew, final HttpClient httpClient) {
CommonUtils.assertNotNull(casServerUrl,
"the validationUrl cannot be null");
CommonUtils
.assertNotNull(httpClient, "httpClient cannot be null.");
this.casServerUrl = casServerUrl;
this.renew = renew;
this.httpClient = httpClient;
}
/**
* Helper method to encode the service url.
*
* @param value the String to encode.
* @return the encoded String.
*/
protected final String urlEncode(final String value) {
try {
return URLEncoder.encode(value, "UTF-8");
} catch (final Exception e) {
throw new RuntimeException(e);
}
}
protected final String getCasServerUrl() {
return this.casServerUrl;
}
protected final boolean isRenew() {
return this.renew;
}
}

View File

@ -1,46 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.validation;
import org.jasig.cas.authentication.principal.Principal;
import org.jasig.cas.authentication.principal.Service;
import java.io.Serializable;
import java.util.Map;
/**
* Interface to represent a successful response from the CAS Server.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public interface Assertion extends Serializable {
/**
* Method to retrieve the principal.
*
* @return the principal.
*/
Principal getPrincipal();
/**
* Map of attributes returned by the CAS server. A client must know what
* attributes he is looking for as CAS makes no claims about what attributes
* are returned.
*
* @return the map of attributes.
*/
Map getAttributes();
/**
* Retrieves a proxy ticket for the specific service.
*
* @param service The service to proxy to.
* @return the Proxy Ticket Id or null.
*/
String getProxyTicketFor(Service service);
}

View File

@ -1,43 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.validation;
/**
* Static holder that places Assertion in a threadlocal.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public class AssertionHolder {
/**
* ThreadLocal to hold the Assertion for Threads to access.
*/
private static final ThreadLocal threadLocal = new ThreadLocal();
/**
* Retrieve the assertion from the ThreadLocal.
*/
public static Assertion getAssertion() {
return (Assertion) threadLocal.get();
}
/**
* Add the Assertion to the ThreadLocal.
*/
public static void setAssertion(final Assertion assertion) {
threadLocal.set(assertion);
}
/**
* Clear the ThreadLocal.
*/
public static void clear() {
threadLocal.set(null);
}
}

View File

@ -1,103 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.validation;
import org.jasig.cas.authentication.principal.Principal;
import org.jasig.cas.authentication.principal.Service;
import org.jasig.cas.client.proxy.ProxyRetriever;
import org.jasig.cas.client.util.CommonUtils;
import java.util.HashMap;
import java.util.Map;
/**
* Concrete implementation of an Assertion.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public class AssertionImpl implements Assertion {
/**
* Unique id for serialization.
*/
private static final long serialVersionUID = 1L;
/**
* Map of the attributes returned by the CAS server. This is optional as the
* CAS server spec makes no mention of attributes.
*/
private final Map attributes;
/**
* The principal who was authenticated.
*/
private final Principal principal;
/**
* The Proxy Granting Ticket Id returned by the server.
*/
private final String proxyGrantingTicketId;
/**
* Reference to ProxyRetriever so that clients can retrieve proxy tickets for a service.
*/
private final ProxyRetriever proxyRetriever;
/**
* Simple constructor that accepts a Principal.
*
* @param principal the Principal this assertion is for.
*/
public AssertionImpl(final Principal principal) {
this(principal, null, null, null);
}
/**
* Constructor that accepts a Principal and a map of attributes.
*
* @param principal the Principal this assertion is for.
* @param attributes a map of attributes about the principal.
*/
public AssertionImpl(final Principal principal, final Map attributes) {
this(principal, attributes, null, null);
}
/**
* @param principal the Principal this assertion is for.
* @param attributes a map of attributes about the principal.
* @param proxyRetriever used to retrieve proxy tickets from CAS Server.
* @param proxyGrantingTicketId the Id to use to request proxy tickets.
*/
public AssertionImpl(final Principal principal, final Map attributes,
final ProxyRetriever proxyRetriever, final String proxyGrantingTicketId) {
CommonUtils.assertNotNull(principal, "principal cannot be null");
this.principal = principal;
this.attributes = attributes == null ? new HashMap() : attributes;
this.proxyGrantingTicketId = CommonUtils
.isNotEmpty(proxyGrantingTicketId) ? proxyGrantingTicketId : null;
this.proxyRetriever = proxyRetriever;
}
public final Map getAttributes() {
return this.attributes;
}
public String getProxyTicketFor(final Service service) {
if (proxyRetriever == null || proxyGrantingTicketId == null) {
return null;
}
return this.proxyRetriever.getProxyTicketIdFor(this.proxyGrantingTicketId, service);
}
public final Principal getPrincipal() {
return this.principal;
}
}

View File

@ -1,55 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.validation;
import org.apache.commons.httpclient.HttpClient;
import org.jasig.cas.authentication.principal.Principal;
import org.jasig.cas.authentication.principal.Service;
import org.jasig.cas.authentication.principal.SimplePrincipal;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.StringReader;
/**
* Implementation of TicketValidator that follows the CAS 1.0 protocol.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class Cas10TicketValidator extends AbstractUrlBasedTicketValidator {
public Cas10TicketValidator(final String casServerUrl, final boolean renew, final HttpClient httpClient) {
super(casServerUrl, renew, httpClient);
}
protected String constructURL(final String ticketId, final Service service) {
return getCasServerUrl() + "validate?ticket=" + ticketId
+ (isRenew() ? "&renew=true" : "") + "&service="
+ urlEncode(service.getId());
}
protected final Assertion parseResponse(final String response)
throws ValidationException {
if (response == null || "no\n\n".equals(response)
|| !response.startsWith("yes")) {
throw new ValidationException(
"'No' response returned from server for validation request.");
}
try {
final BufferedReader reader = new BufferedReader(new StringReader(
response));
reader.readLine();
final Principal principal = new SimplePrincipal(reader.readLine());
return new AssertionImpl(principal, null);
} catch (final IOException e) {
throw new ValidationException("Unable to parse response.", e);
}
}
}

View File

@ -1,109 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.validation;
import org.apache.commons.httpclient.HttpClient;
import org.jasig.cas.authentication.principal.Service;
import org.jasig.cas.authentication.principal.SimpleService;
import org.jasig.cas.client.proxy.ProxyGrantingTicketStorage;
import org.jasig.cas.client.proxy.ProxyRetriever;
import org.jasig.cas.client.util.CommonUtils;
import org.jasig.cas.client.util.XmlUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
/**
* Implementation of the TicketValidator interface that knows how to handle
* proxy tickets.
* <p/>
* In your XML configuration file, proxy chains should be defined as
* follows: &lt;list&gt; &lt;value&gt; proxy1 proxy2 proxy3&lt;/value&gt;
* &lt;value&gt; proxy2 proxy4 proxy5&lt;/value&gt; &lt;value&gt; proxy4
* proxy5 proxy6&lt;/value&gt; &lt;/list&gt;
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public class Cas20ProxyTicketValidator extends Cas20ServiceTicketValidator {
/* List of proxy chains that we accept. */
private final List proxyChains;
/**
* Boolean whether we accept any proxy request or not.
*/
private final boolean acceptAnyProxy;
/**
* @param casServerUrl the url to the CAS server, minus the endpoint.
* @param renew flag for whether we require authentication to be via an initial authentication.
* @param httpClient an instance of HttpClient to do the calls.
* @param proxyChains the chains of proxy lists that we accept tickets from.
* @param acceptAnyProxy flag on whether we accept any proxy or not.
*/
public Cas20ProxyTicketValidator(final String casServerUrl, final boolean renew, final HttpClient httpClient, List proxyChains, boolean acceptAnyProxy) {
this(casServerUrl, renew, httpClient, null, proxyChains, acceptAnyProxy, null, null);
}
public Cas20ProxyTicketValidator(final String casServerUrl, final boolean renew, final HttpClient httpClient, final Service proxyCallbackUrl, List proxyChains, boolean acceptAnyProxy, final ProxyGrantingTicketStorage proxyGrantingTicketStorage, final ProxyRetriever proxyRetriever) {
super(casServerUrl, renew, httpClient, proxyCallbackUrl, proxyGrantingTicketStorage, proxyRetriever);
CommonUtils.assertTrue(proxyChains != null || acceptAnyProxy,
"proxyChains cannot be null or acceptAnyProxy must be true.");
CommonUtils.assertTrue((proxyChains != null && !proxyChains
.isEmpty())
|| acceptAnyProxy,
"proxyChains cannot be empty or acceptAnyProxy must be true.");
// assume each proxy chain has a length of 2
final List tempProxyChains = new ArrayList(proxyChains.size() * 2);
for (final Iterator iter = proxyChains.iterator(); iter.hasNext();) {
final String[] values = ((String) iter.next()).split(" ");
final Service[] principals = new Service[values.length];
for (int i = 0; i < principals.length; i++) {
principals[i] = new SimpleService(values[i]);
}
tempProxyChains.add(principals);
}
this.proxyChains = tempProxyChains;
this.acceptAnyProxy = acceptAnyProxy;
}
protected String getValidationUrlName() {
return "proxyValidate";
}
protected Assertion getValidAssertionInternal(final String response, final String principal, final String proxyGrantingTicketIou) throws ValidationException {
final List proxies = XmlUtils.getTextForElements(response, "proxy");
// this means there was nothing in the proxy chain, which is okay
if (proxies.isEmpty() || this.acceptAnyProxy) {
return getAssertionBasedOnProxyGrantingTicketIou(proxyGrantingTicketIou, principal);
}
final Service[] principals = new Service[proxies.size()];
int i = 0;
for (final Iterator iter = proxies.iterator(); iter.hasNext();) {
principals[i++] = new SimpleService((String) iter.next());
}
for (Iterator iter = this.proxyChains.iterator(); iter.hasNext();) {
if (Arrays.equals(principals, (Object[]) iter.next())) {
return getAssertionBasedOnProxyGrantingTicketIou(proxyGrantingTicketIou, principal);
}
}
throw new InvalidProxyChainValidationException();
}
}

View File

@ -1,111 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.validation;
import org.apache.commons.httpclient.HttpClient;
import org.jasig.cas.authentication.principal.Service;
import org.jasig.cas.authentication.principal.SimplePrincipal;
import org.jasig.cas.client.proxy.ProxyGrantingTicketStorage;
import org.jasig.cas.client.proxy.ProxyRetriever;
import org.jasig.cas.client.util.CommonUtils;
import org.jasig.cas.client.util.XmlUtils;
/**
* Implementation of TicketValidator that follows the CAS 2.0 protocol (without
* proxying).
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public class Cas20ServiceTicketValidator extends
AbstractUrlBasedTicketValidator {
/**
* Proxy callback url to send to the CAS server.
*/
private final Service proxyCallbackUrl;
/**
* The storage mechanism for the ProxyGrantingTickets.
*/
private final ProxyGrantingTicketStorage proxyGrantingTicketStorage;
/**
* Injected into Assertions to allow them to retrieve proxy tickets.
*/
private final ProxyRetriever proxyRetriever;
public Cas20ServiceTicketValidator(final String casServerUrl, final boolean renew, final HttpClient httpClient) {
this(casServerUrl, renew, httpClient, null, null, null);
}
public Cas20ServiceTicketValidator(final String casServerUrl, final boolean renew, final HttpClient httpClient, final Service proxyCallbackUrl, final ProxyGrantingTicketStorage proxyGrantingTicketStorage, final ProxyRetriever proxyRetriever) {
super(casServerUrl, renew, httpClient);
if (proxyCallbackUrl != null) {
CommonUtils.assertNotNull(proxyGrantingTicketStorage,
"proxyGrantingTicketStorage cannot be null");
CommonUtils.assertNotNull(proxyRetriever, "proxyRetriever cannot be null.");
}
this.proxyCallbackUrl = proxyCallbackUrl;
this.proxyGrantingTicketStorage = proxyGrantingTicketStorage;
this.proxyRetriever = proxyRetriever;
}
protected String constructURL(final String ticketId,
final Service service) {
return getCasServerUrl()
+ getValidationUrlName()
+ "?ticket="
+ ticketId
+ (isRenew() ? "&renew=true" : "")
+ "&service="
+ urlEncode(service.getId())
+ (this.proxyCallbackUrl != null ? "&pgtUrl="
+ urlEncode(this.proxyCallbackUrl.getId()) : "");
}
protected final Assertion parseResponse(final String response)
throws ValidationException {
final String error = XmlUtils.getTextForElement(response,
"authenticationFailure");
if (CommonUtils.isNotBlank(error)) {
log.debug("Validation of ticket failed: " + error);
throw new ValidationException(error);
}
final String principal = XmlUtils.getTextForElement(response, "user");
final String proxyGrantingTicketIou = XmlUtils.getTextForElement(
response, "proxyGrantingTicket");
if (CommonUtils.isEmpty(principal)) {
throw new ValidationException("No principal found.");
}
return getValidAssertionInternal(response, principal, proxyGrantingTicketIou);
}
protected String getValidationUrlName() {
return "serviceValidate";
}
protected final Assertion getAssertionBasedOnProxyGrantingTicketIou(final String proxyGrantingTicketIou, final String principal) {
if (CommonUtils.isNotBlank(proxyGrantingTicketIou)) {
return new AssertionImpl(
new SimplePrincipal(principal), null, this.proxyRetriever, this.proxyGrantingTicketStorage == null ? null : this.proxyGrantingTicketStorage
.retrieve(proxyGrantingTicketIou));
} else {
return new AssertionImpl(new SimplePrincipal(principal));
}
}
protected Assertion getValidAssertionInternal(final String response, final String principal, final String proxyGrantingTicketIou) throws ValidationException {
return getAssertionBasedOnProxyGrantingTicketIou(proxyGrantingTicketIou, principal);
}
}

View File

@ -1,30 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.validation;
/**
* Specific instance of a ValidationException that is thrown when the proxy
* chain does not match what is returned.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class InvalidProxyChainValidationException extends ValidationException {
/**
* Unique id for serialization.
*/
private static final long serialVersionUID = 1L;
public InvalidProxyChainValidationException() {
super();
}
public InvalidProxyChainValidationException(String message) {
super(message);
}
}

View File

@ -1,170 +0,0 @@
package org.jasig.cas.client.validation;
import org.apache.commons.httpclient.HttpClient;
import org.jasig.cas.authentication.principal.Service;
import org.jasig.cas.authentication.principal.AttributePrincipal;
import org.jasig.cas.authentication.principal.SimpleAttributePrincipal;
import org.opensaml.SAMLAssertion;
import org.opensaml.SAMLAttribute;
import org.opensaml.SAMLAttributeStatement;
import org.opensaml.SAMLAuthenticationStatement;
import org.opensaml.SAMLException;
import org.opensaml.SAMLResponse;
import org.opensaml.SAMLStatement;
import org.opensaml.SAMLSubject;
import java.io.ByteArrayInputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.net.URLEncoder;
/**
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.1
*/
public class Saml10TicketValidator extends AbstractUrlBasedTicketValidator {
/**
* Number of milliseconds the client/server clocks can be off by.
*/
private final long tolerance;
public Saml10TicketValidator(final String casServerUrl, final HttpClient httpClient) {
super(casServerUrl, false, httpClient);
this.tolerance = 1000L;
}
public Saml10TicketValidator(final String casServerUrl, final HttpClient httpClient, final long tolerance) {
super(casServerUrl, false, httpClient);
this.tolerance = tolerance;
}
protected String constructURL(final String ticketId, final Service service) {
return getCasServerUrl() + "/samlValidate?SAMLart=" + urlEncode(ticketId) + "&TARGET=" + urlEncode(service.getId());
}
protected Assertion parseResponse(final String response) throws ValidationException {
try {
log.debug(response);
final SAMLResponse samlResponse = new SAMLResponse(new ByteArrayInputStream(response.getBytes()));
// check to see if we have any assertions
if (!samlResponse.getAssertions().hasNext()) {
throw new ValidationException("No assertions found.");
}
for (final Iterator iter = samlResponse.getAssertions(); iter.hasNext();) {
final SAMLAssertion assertion = (SAMLAssertion) iter.next();
if (!isValidAssertion(assertion)) {
continue;
}
final SAMLAuthenticationStatement authenticationStatement = getSAMLAuthenticationStatement(assertion);
if (authenticationStatement == null) {
throw new ValidationException("No AuthentiationStatement found in SAML Assertion.");
}
final SAMLSubject subject = authenticationStatement.getSubject();
if (subject == null) {
throw new ValidationException("No Subject found in SAML Assertion.");
}
final SAMLAttribute[] attributes = getAttributesFor(assertion, subject);
final Map personAttributes = new HashMap();
for (int i = 0; i < attributes.length; i++) {
final SAMLAttribute samlAttribute = attributes[i];
final List values = getValuesFrom(samlAttribute);
personAttributes.put(samlAttribute.getName(), values.size() == 1 ? values.get(0) : values);
}
final AttributePrincipal principal = new SimpleAttributePrincipal(subject.getNameIdentifier().getName(), personAttributes);
final Map authenticationAttributes = new HashMap();
authenticationAttributes.put("samlAuthenticationStatement::authMethod", authenticationStatement.getAuthMethod());
final Assertion casAssertion = new AssertionImpl(principal, authenticationAttributes);
return casAssertion;
}
} catch (final SAMLException e) {
log.error(e,e);
throw new ValidationException(e);
}
throw new ValidationException("No valid assertions from the SAML response found.");
}
private boolean isValidAssertion(final SAMLAssertion assertion) {
final Date notBefore = assertion.getNotBefore();
final Date notOnOrAfter = assertion.getNotOnOrAfter();
if (assertion.getNotBefore() == null || assertion.getNotOnOrAfter() == null) {
log.debug("Assertion has no bounding dates. Will not process.");
return false;
}
final long currentTime = new Date().getTime();
if (currentTime + tolerance < notBefore.getTime()) {
log.debug("skipping assertion that's not yet valid...");
return false;
}
if (notOnOrAfter.getTime() <= currentTime - tolerance) {
log.debug("skipping expired assertion...");
return false;
}
return true;
}
private SAMLAuthenticationStatement getSAMLAuthenticationStatement(final SAMLAssertion assertion) {
for (final Iterator iter = assertion.getStatements(); iter.hasNext();) {
final SAMLStatement statement = (SAMLStatement) iter.next();
if (statement instanceof SAMLAuthenticationStatement) {
return (SAMLAuthenticationStatement) statement;
}
}
return null;
}
private SAMLAttribute[] getAttributesFor(final SAMLAssertion assertion, final SAMLSubject subject) {
final List attributes = new ArrayList();
for (final Iterator iter = assertion.getStatements(); iter.hasNext();) {
final SAMLStatement statement = (SAMLStatement) iter.next();
if (statement instanceof SAMLAttributeStatement) {
final SAMLAttributeStatement attributeStatement = (SAMLAttributeStatement) statement;
// used because SAMLSubject does not implement equals
if (subject.getNameIdentifier().getName().equals(attributeStatement.getSubject().getNameIdentifier().getName())) {
for (final Iterator iter2 = attributeStatement.getAttributes(); iter2.hasNext();)
attributes.add(iter2.next());
}
}
}
return (SAMLAttribute[]) attributes.toArray(new SAMLAttribute[attributes.size()]);
}
private List getValuesFrom(final SAMLAttribute attribute) {
final List list = new ArrayList();
for (final Iterator iter = attribute.getValues(); iter.hasNext();) {
list.add(iter.next());
}
return list;
}
}

View File

@ -1,31 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.validation;
import org.jasig.cas.authentication.principal.Service;
/**
* Interface to encapsulate the validation of a ticket. The inteface is
* specification neutral. Any implementation can be provided, including
* something that parses CAS1 or CAS2 responses.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public interface TicketValidator {
/**
* Method to validate a ticket for a give Service.
*
* @param ticketId the ticket to validate
* @param service the service to validate the ticket for
* @return the Assertion about the ticket (never null)
* @throws ValidationException if there is a problem validating the ticket.
*/
Assertion validate(String ticketId, Service service)
throws ValidationException;
}

View File

@ -1,57 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.validation;
/**
* Implementation of Exception to be thrown when there is an error validating
* the Ticket returned from the CAS server.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public class ValidationException extends Exception {
/**
* Unique Id for serialization.
*/
private static final long serialVersionUID = 1L;
/**
* Default constructor.
*/
public ValidationException() {
super();
}
/**
* Constructor that accepts a message and a chained exception.
*
* @param message the error message.
* @param cause the exception we are chaining with.
*/
public ValidationException(final String message, final Throwable cause) {
super(message, cause);
}
/**
* Constructor that accepts a message.
*
* @param message the error message.
*/
public ValidationException(final String message) {
super(message);
}
/**
* Constructor that accepts a chained exception.
*
* @param cause the exception we are chaining with.
*/
public ValidationException(final Throwable cause) {
super(cause);
}
}

View File

@ -1,5 +0,0 @@
<html>
<body>
<p>This package contains common utilities used within the CAS client classes.</p>
</body>
</html>

View File

@ -1,182 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.web.filter;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jasig.cas.client.util.CommonUtils;
import org.jasig.cas.web.support.ArgumentExtractor;
import org.jasig.cas.web.support.CasArgumentExtractor;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* Abstract class that contains common functionality amongst CAS filters.
* <p/>
* You must specify the serverName (format: hostname:port) or the serviceUrl. If you specify both, the
* serviceUrl is used over the serverName.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public abstract class AbstractCasFilter implements Filter {
/**
* Constant representing where we store the <code>Assertion</code> in the
* session.
*/
public static final String CONST_ASSERTION = "_cas_assertion_";
/**
* Constant representing where we flag a gatewayed request in the session.
*/
public static final String CONST_GATEWAY = "_cas_gateway_";
/**
* Constant representing where we flag a principal.
*/
public static final String CONST_PRINCIPAL = "_cas_principal_";
/**
* Instance of Commons Logging.
*/
protected final Log log = LogFactory.getLog(this.getClass());
/**
* The name of the server in the following format: <hostname>:<port> where
* port is optional if its a standard port.
*/
private final String service;
/**
* The exact service url to match to.
*/
private final boolean isServerName;
/**
* Whether to store the entry in session or not. Defaults to true.
*/
private boolean useSession = true;
/** Instance of an ArgumentExtractor to retrieve arguments based on supported protocol. Default is the CAS 2 protocol. */
private ArgumentExtractor argumentExtractor = new CasArgumentExtractor();
protected AbstractCasFilter(final String service, final boolean isServerName) {
CommonUtils.assertNotNull(service, "service must be set");
this.service = service;
this.isServerName = isServerName;
log.info("Service set to: " + this.service + "; Is Server Name? set to: " + this.isServerName + "Use Session set to: " + this.useSession);
}
public final void destroy() {
// nothing to do
}
public final void doFilter(final ServletRequest servletRequest,
final ServletResponse servletResponse, final FilterChain filterChain)
throws IOException, ServletException {
doFilterInternal((HttpServletRequest) servletRequest,
(HttpServletResponse) servletResponse, filterChain);
}
protected abstract void doFilterInternal(HttpServletRequest request,
HttpServletResponse response, FilterChain filterChain)
throws IOException, ServletException;
public void init(final FilterConfig filterConfig) throws ServletException {
// nothing to do here
}
/**
* Constructs a service url from the HttpServletRequest or from the given
* serviceUrl. Prefers the serviceUrl provided if both a serviceUrl and a
* serviceName.
*
* @param request the HttpServletRequest
* @param response the HttpServletResponse
* @return the service url to use.
*/
protected final String constructServiceUrl(final HttpServletRequest request,
final HttpServletResponse response) {
if (!isServerName) {
return response.encodeURL(this.service);
}
final StringBuffer buffer = new StringBuffer();
synchronized (buffer) {
buffer.append(request.isSecure() ? "https://" : "http://");
buffer.append(this.service);
buffer.append(request.getRequestURI());
if (CommonUtils.isNotBlank(request.getQueryString())) {
final int location = request.getQueryString().indexOf(
this.argumentExtractor.getArtifactParameterName() + "=");
if (location == 0) {
final String returnValue = response.encodeURL(buffer
.toString());
if (log.isDebugEnabled()) {
log.debug("serviceUrl generated: " + returnValue);
}
return returnValue;
}
buffer.append("?");
if (location == -1) {
buffer.append(request.getQueryString());
} else if (location > 0) {
final int actualLocation = request.getQueryString()
.indexOf("&" + this.argumentExtractor.getArtifactParameterName() + "=");
if (actualLocation == -1) {
buffer.append(request.getQueryString());
} else if (actualLocation > 0) {
buffer.append(request.getQueryString().substring(0,
actualLocation));
}
}
}
}
final String returnValue = response.encodeURL(buffer.toString());
if (log.isDebugEnabled()) {
log.debug("serviceUrl generated: " + returnValue);
}
return returnValue;
}
protected final boolean isUseSession() {
return this.useSession;
}
public final void setUseSession(final boolean useSession) {
this.useSession = useSession;
}
protected ArgumentExtractor getArgumentExtractor() {
return this.argumentExtractor;
}
public void setArgumentExtractor(final ArgumentExtractor argumentExtractor) {
CommonUtils.assertNotNull(argumentExtractor, "argumentExtractor cannot be null.");
this.argumentExtractor = argumentExtractor;
}
}

View File

@ -1,51 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.web.filter;
import org.jasig.cas.client.validation.Assertion;
import org.jasig.cas.client.validation.AssertionHolder;
import org.springframework.web.util.WebUtils;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
/**
* Places the assertion in a ThreadLocal such that other resources can access it that do not have access to the web tier session.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class AssertionThreadLocalFilter implements Filter {
public void init(final FilterConfig filterConfig) throws ServletException {
// nothing to do here
}
public void doFilter(final ServletRequest servletRequest, final ServletResponse servletResponse, final FilterChain filterChain) throws IOException, ServletException {
final HttpServletRequest request = (HttpServletRequest) servletRequest;
final Assertion assertion = (Assertion) WebUtils
.getSessionAttribute(request,
AbstractCasFilter.CONST_ASSERTION);
try {
AssertionHolder.setAssertion(assertion);
filterChain.doFilter(servletRequest, servletResponse);
} finally {
AssertionHolder.clear();
}
}
public void destroy() {
// nothing to do
}
}

View File

@ -1,97 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.web.filter;
import org.jasig.cas.client.util.CommonUtils;
import org.jasig.cas.client.validation.Assertion;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.net.URLEncoder;
/**
* Filter implementation to intercept all requests and attempt to authenticate
* the user by redirecting them to CAS (unless the user has a ticket).
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class AuthenticationFilter extends AbstractCasFilter {
/**
* The URL to the CAS Server login.
*/
private final String casServerLoginUrl;
/**
* Whether to send the renew request or not.
*/
private boolean renew = false;
/**
* Whether to send the gateway request or not.
*/
private boolean gateway = false;
public AuthenticationFilter(final String serverName, final boolean isServerName, String casServerLoginUrl) {
super(serverName, isServerName);
CommonUtils.assertNotNull(casServerLoginUrl,
"the CAS Server Login URL cannot be null.");
this.casServerLoginUrl = casServerLoginUrl;
}
protected void doFilterInternal(final HttpServletRequest request,
final HttpServletResponse response, final FilterChain filterChain)
throws IOException, ServletException {
final HttpSession session = request.getSession(isUseSession());
final String ticket = request.getParameter(getArgumentExtractor().getArtifactParameterName());
final Assertion assertion = session != null ? (Assertion) session
.getAttribute(CONST_ASSERTION) : null;
final boolean wasGatewayed = session != null
&& session.getAttribute(CONST_GATEWAY) != null;
if (CommonUtils.isBlank(ticket) && assertion == null && !wasGatewayed) {
log.debug("no ticket and no assertion found");
if (this.gateway && session != null) {
log.debug("setting gateway attribute in session");
session.setAttribute(CONST_GATEWAY, "yes");
}
final String serviceUrl = constructServiceUrl(request, response);
final String urlToRedirectTo = this.casServerLoginUrl + "?" + getArgumentExtractor().getServiceParameterName() + "="
+ URLEncoder.encode(serviceUrl, "UTF-8")
+ (this.renew ? "&renew=true" : "")
+ (this.gateway ? "&gateway=true" : "");
if (log.isDebugEnabled()) {
log.debug("redirecting to \"" + urlToRedirectTo + "\"");
}
response.sendRedirect(urlToRedirectTo);
return;
}
if (session != null) {
log.debug("removing gateway attribute from session");
session.setAttribute(CONST_GATEWAY, null);
}
filterChain.doFilter(request, response);
}
public void setRenew(final boolean renew) {
this.renew = renew;
}
public void setGateway(final boolean gateway) {
this.gateway = gateway;
}
}

View File

@ -1,95 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.web.filter;
import org.jasig.cas.authentication.principal.Principal;
import org.jasig.cas.client.authorization.AuthorizationException;
import org.jasig.cas.client.authorization.AuthorizedDecider;
import org.jasig.cas.client.util.CommonUtils;
import org.jasig.cas.client.validation.Assertion;
import org.springframework.web.util.WebUtils;
import org.apache.commons.logging.LogFactory;
import org.apache.commons.logging.Log;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* Simple filter that attempts to determine if someone is authorized to use the
* system. Assumes that you are protecting the application with the
* AuthenticationFilter such that the Assertion is set in the session.
* <p/>
* If a user is not authorized to use the application, the response code of 403
* will be sent to the browser.
* <p/>
* This filter needs to be configured after both the authentication filter and
* the validation filter.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @see AuthorizedDecider
* @since 3.0
*/
public final class AuthorizationFilter implements Filter {
/**
* Instance of Commons Logging.
*/
private final Log log = LogFactory.getLog(this.getClass());
/**
* Decider that determines whether a specified principal has access to the
* resource or not.
*/
private final AuthorizedDecider decider;
/**
* @param casAuthorizedDecider the thing actually deciding to grant access or not.
*/
public AuthorizationFilter(final AuthorizedDecider casAuthorizedDecider) {
CommonUtils.assertNotNull(casAuthorizedDecider,
"the casAuthorizedDecider cannot be null.");
this.decider = casAuthorizedDecider;
}
public void destroy() {
// nothing to do here
}
public void doFilter(final ServletRequest servletRequest,
final ServletResponse servletResponse, final FilterChain filterChain)
throws IOException, ServletException {
final HttpServletRequest request = (HttpServletRequest) servletRequest;
final HttpServletResponse response = (HttpServletResponse) servletResponse;
final Assertion assertion = (Assertion) WebUtils.getRequiredSessionAttribute(request, AbstractCasFilter.CONST_ASSERTION);
final Principal principal = assertion.getPrincipal();
final boolean authorized = this.decider
.isAuthorizedToUseApplication(principal);
if (!authorized) {
log.debug("User not authorized to access application.");
response.setStatus(HttpServletResponse.SC_FORBIDDEN);
throw new AuthorizationException(principal.getId()
+ " is not authorized to use this application.");
}
log.debug("User successfully authorized.");
filterChain.doFilter(servletRequest, servletResponse);
}
public void init(final FilterConfig filterConfig) throws ServletException {
// nothing to do here
}
}

View File

@ -1,80 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.web.filter;
import org.jasig.cas.client.validation.Assertion;
import org.springframework.web.util.WebUtils;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import java.io.IOException;
/**
* Implementation of a filter that wraps the normal HttpServletRequest with a
* wrapper that overrides the getRemoteUser method to retrieve the user from the
* CAS Assertion.
* <p/>
* This filter needs to be configured in the chain so that it executes after
* both the authentication and the validation filters.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class HttpServletRequestWrapperFilter implements Filter {
public void destroy() {
// nothing to do
}
/**
* Wraps the HttpServletRequest in a wrapper class that delegates
* <code>request.getRemoteUser</code> to the underlying Assertion object
* stored in the user session.
*/
public void doFilter(final ServletRequest servletRequest,
final ServletResponse servletResponse, final FilterChain filterChain)
throws IOException, ServletException {
filterChain.doFilter(new CasHttpServletRequestWrapper(
(HttpServletRequest) servletRequest), servletResponse);
}
public void init(final FilterConfig filterConfig) throws ServletException {
// nothing to do
}
final class CasHttpServletRequestWrapper extends HttpServletRequestWrapper {
CasHttpServletRequestWrapper(final HttpServletRequest request) {
super(request);
}
public String getRemoteUser() {
final org.jasig.cas.authentication.principal.Principal p = (org.jasig.cas.authentication.principal.Principal) this
.getAttribute(AbstractCasFilter.CONST_PRINCIPAL);
if (p != null) {
return p.getId();
}
final Assertion assertion = (Assertion) WebUtils
.getSessionAttribute(this,
AbstractCasFilter.CONST_ASSERTION);
if (assertion != null) {
return assertion.getPrincipal().getId();
}
return null;
}
}
}

View File

@ -1,122 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.web.filter;
import org.jasig.cas.authentication.principal.SimpleService;
import org.jasig.cas.client.util.CommonUtils;
import org.jasig.cas.client.validation.Assertion;
import org.jasig.cas.client.validation.TicketValidator;
import org.jasig.cas.client.validation.ValidationException;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* Implementation of a Filter that checks for a "ticket" and if one is found,
* will attempt to validate the ticket. On a successful validation, it sets the
* Assertion object into the session. On an unsuccessful validation attempt, it
* sets the response code to 403.
* <p/>
* This filter needs to be configured after the authentication filter (if that
* filter exists in the chain).
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @see TicketValidator
* @since 3.0
*/
public final class TicketValidationFilter extends AbstractCasFilter {
/**
* Instance of the ticket validator.
*/
private final TicketValidator ticketValidator;
/**
* Specify whether the filter should redirect the user agent after a
* successful validation to remove the ticket parameter from the query
* string.
*/
private boolean redirectAfterValidation = false;
/** Determines whether an exception is thrown when there is a ticket validation failure. */
private boolean exceptionOnValidationFailure = true;
/**
* Constructor that takes the severName (or serviceUrl), TicketValidator, useSession and redirectAfterValidation. Either serveName or serviceUrl is required (but not both).
*
* @param service the name of the server in <hostname>:<port> combination, if using a non-standard port or the fully qualified url.
* @param isServerName whether the service is the host name or the fully qualified url.
* @param ticketValidator the validator to validate the tickets.
*/
public TicketValidationFilter(final String service, final boolean isServerName, final TicketValidator ticketValidator) {
super(service, isServerName);
CommonUtils.assertNotNull(ticketValidator,
"ticketValidator cannot be null.");
this.ticketValidator = ticketValidator;
log.info("Initialized with the following properties: " +
"ticketValidator=" + this.ticketValidator.getClass().getName() + "; " +
"redirectAfterValidation=" + this.redirectAfterValidation + "; exceptionOnValidationFailure=" + exceptionOnValidationFailure);
}
protected void doFilterInternal(final HttpServletRequest request,
final HttpServletResponse response, final FilterChain filterChain)
throws IOException, ServletException {
final String ticket = request.getParameter(getArgumentExtractor().getArtifactParameterName());
if (CommonUtils.isNotBlank(ticket)) {
if (log.isDebugEnabled()) {
log.debug("Attempting to validate ticket: " + ticket);
}
try {
final Assertion assertion = this.ticketValidator.validate(
ticket, new SimpleService(constructServiceUrl(request,
response)));
if (log.isDebugEnabled()) {
log.debug("Successfully authenticated user: "
+ assertion.getPrincipal().getId());
}
request.setAttribute(CONST_PRINCIPAL, assertion.getPrincipal());
if (isUseSession()) {
request.getSession().setAttribute(CONST_ASSERTION,
assertion);
}
} catch (final ValidationException e) {
response.setStatus(HttpServletResponse.SC_FORBIDDEN);
log.warn(e, e);
if (this.exceptionOnValidationFailure) {
throw new ServletException(e);
}
}
if (this.redirectAfterValidation) {
response.sendRedirect(response
.encodeRedirectURL(constructServiceUrl(request, response)));
return;
}
}
filterChain.doFilter(request, response);
}
public void setRedirectAfterValidation(final boolean redirectAfterValidation) {
this.redirectAfterValidation = redirectAfterValidation;
}
public void setExceptionOnValidationFailure(final boolean exceptionOnValidationFailure) {
this.exceptionOnValidationFailure = exceptionOnValidationFailure;
}
}

View File

@ -1,6 +0,0 @@
<html>
<body>
<p>This package contains all of the useful filters related to normal CAS processing, including Authentication,
Validation and Authorization.</p>
</body>
</html>

View File

@ -1,6 +0,0 @@
cas.server.gateway=false
cas.server.renew=false
cas.server.url=https://localhost:8443/cas/
cas.server.proxyCallbackUrl=https://localhost:8443/manager/proxy/Receptor
cas.client.serverName=localhost:8443
cas.client.proxyCallbackUrl=https://localhost:8443/myClientApp/casProxyReceptor

View File

@ -1,91 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="propertyPlaceholderConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location"
value="/WEB-INF/cas-client.properties"/>
</bean>
<bean
id="authorizedDecider"
class="org.jasig.cas.client.authorization.DefaultAuthorizedDeciderImpl">
<constructor-arg index="0">
<list>
<value>scott</value>
<value>velpi</value>
<value>apetro</value>
</list>
</constructor-arg>
</bean>
<bean
id="httpClient"
class="org.jasig.cas.util.HttpClient3FactoryBean"/>
<bean
id="proxyRetriever"
class="org.jasig.cas.client.proxy.Cas20ProxyRetriever">
<constructor-arg index="0" value="${cas.server.url}"/>
<constructor-arg index="1" ref="httpClient"/>
</bean>
<bean id="proxyGrantingTicketStorage"
class="org.jasig.cas.client.proxy.ProxyGrantingTicketStorageImpl"/>
<bean
id="ticketValidator"
class="org.jasig.cas.client.validation.Cas20ProxyTicketValidator">
<constructor-arg index="0" value="${cas.server.url}"/>
<constructor-arg index="1" value="${cas.server.renew}"/>
<constructor-arg index="2" ref="httpClient"/>
<constructor-arg index="3">
<bean
class="org.jasig.cas.authentication.principal.SimpleService">
<!-- proxyCallbackUrl: does nothing when using the ServiceTicketValidator -->
<constructor-arg value="${cas.client.proxyCallbackUrl}"/>
</bean>
</constructor-arg>
<constructor-arg index="4">
<list></list>
</constructor-arg>
<constructor-arg index="5" value="true"/>
<constructor-arg index="6" ref="proxyGrantingTicketStorage"/>
<constructor-arg index="7" ref="proxyRetriever"/>
</bean>
<bean
id="casHttpServletRequestWrapperFilter"
class="org.jasig.cas.client.web.filter.HttpServletRequestWrapperFilter"/>
<bean
id="casValidationFilter"
class="org.jasig.cas.client.web.filter.TicketValidationFilter">
<!-- serverName of client to construct serviceURL eg:"thisServer.myDomain.net" -->
<constructor-arg index="0" value="${cas.client.serverName}"/>
<!-- true if serverName is host:port, false if fully-qualified URL -->
<constructor-arg index="1" value="true" />
<!-- ticketValidator implementation (defines protocol version to be used) -->
<constructor-arg index="2" ref="ticketValidator"/>
</bean>
<bean
id="casAuthenticationFilter"
class="org.jasig.cas.client.web.filter.AuthenticationFilter">
<!-- serverName of client to construct serviceURL eg:"thisServer.myDomain.net" -->
<constructor-arg index="0" value="${cas.client.serverName}"/>
<!-- true if serverName is host:port, false if fully-qualified URL -->
<constructor-arg index="1" value="true" />
<!-- casServerLoginUrl - fully-qualified CAS login URL -->
<constructor-arg index="2" value="${cas.server.url}login"/>
</bean>
<bean
id="casAuthorizationFilter"
class="org.jasig.cas.client.web.filter.AuthorizationFilter">
<!-- casAuthorizedDecider bean/class -->
<constructor-arg index="0" ref="authorizedDecider"></constructor-arg>
</bean>
</beans>

View File

@ -1,82 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
<web-app>
<display-name>Java CAS Client</display-name>
<!--
- Location of the XML file that defines the root application context
- Applied by ContextLoaderListener.
-->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/simpleFilter.xml
</param-value>
</context-param>
<filter>
<filter-name>CAS Authentication Filter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
<init-param>
<param-name>targetBeanName</param-name>
<param-value>casAuthenticationFilter</param-value>
</init-param>
</filter>
<filter>
<filter-name>CAS Validation Filter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
<init-param>
<param-name>targetBeanName</param-name>
<param-value>casValidationFilter</param-value>
</init-param>
</filter>
<filter>
<filter-name>CAS Authorization Filter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
<init-param>
<param-name>targetBeanName</param-name>
<param-value>casAuthorizationFilter</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CAS Authentication Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>CAS Validation Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>CAS Authorization Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!--
- Loads the root application context of this web app at startup.
- The application context is then available via
- WebApplicationContextUtils.getWebApplicationContext(servletContext).
-->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!--
- Provides core MVC application controller. See contacts-servlet.xml.
-->
<servlet>
<servlet-name>casclient</servlet-name>
<servlet-class>org.jasig.cas.client.proxy.SpringConfiguredProxyReceptorServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>casclient</servlet-name>
<url-pattern>/proxy/Receptor</url-pattern>
</servlet-mapping>
</web-app>

View File

@ -1,98 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
<web-app>
<display-name>Java CAS Client</display-name>
<!--
- Location of the XML file that defines the root application context
- Applied by ContextLoaderListener.
-->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/simpleFilter.xml
</param-value>
</context-param>
<filter>
<filter-name>CAS Authentication Filter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
<init-param>
<param-name>targetBeanName</param-name>
<param-value>casAuthenticationFilter</param-value>
</init-param>
</filter>
<filter>
<filter-name>CAS Validation Filter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
<init-param>
<param-name>targetBeanName</param-name>
<param-value>casValidationFilter</param-value>
</init-param>
</filter>
<!--
<filter>
<filter-name>CAS Authorization Filter Proxy</filter-name>
<filter-class>org.jasig.cas.client.util.FilterToBeanProxy</filter-class>
<init-param>
<param-name>targetBean</param-name>
<param-value>casAuthorizationFilter</param-value>
</init-param>
</filter>
-->
<filter>
<filter-name>CAS HttpServletRequestWrapperFilter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
<init-param>
<param-name>targetBeanName</param-name>
<param-value>casHttpServletRequestWrapperFilter</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CAS Authentication Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>CAS Validation Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!--
<filter-mapping>
<filter-name>CAS Authorization Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
-->
<filter-mapping>
<filter-name>CAS HttpServletRequestWrapperFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!--
- Loads the root application context of this web app at startup.
- The application context is then available via
- WebApplicationContextUtils.getWebApplicationContext(servletContext).
-->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!--
- Provides core MVC application controller. See contacts-servlet.xml.
-->
<servlet>
<servlet-name>casclient</servlet-name>
<servlet-class>org.jasig.cas.client.proxy.SpringConfiguredProxyReceptorServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>casclient</servlet-name>
<url-pattern>casProxyReceptor</url-pattern>
</servlet-mapping>
</web-app>

View File

@ -1,166 +0,0 @@
Product: Clover
License: Open Source License, 0.x, 1.x
Issued: Sun Feb 13 2005 22:45:43 CST
Expiry: Never
Key: aae4c7035b1208e316fa6d684
Name: Scott Battaglia
Org: JA-SIG Central Authentication Service
Certificate: AAACCG+Ow8B7/zEbxOMqqKwwrdpP+a1COmJGHco7sCNLjHkHnajPF+dQW
Ct12PMy0uml0s9xuus5wKngJ9OFk5PFeh01dzQF66bhXH1bvegLfvja3Kle6BYtDv4LZgE
gk3E0aJN4IbgTn+TgUckSevXDR4KzK77NWJfrVzkxV3/JepYRA9UAbsXHiki9WjMIJfzoZ
unjvtTFd/vTOcyirgfT/dTPrG9PAGAjH+e37E9Xf7HnRSrmxtrGX+wdaBOlZFUIIcVHKT2
IaGToLZnx7FvfE3rzyQCYtS+r0E+H61c+dANzySy5PEH2JEyL8M9JrwgYJSju1FWhxbXO2
Gb7y3Diufo80+HWz6xrGzl9IlXRseoXHki8rllk5taXqVv5G3UIsTFzbjjWUDlykn557C2
D4o9T0xQ/6dVFxak75o0MxP4aXGFMZNg/pCBH9DAU7/CKVKRBPAVx1PJ8vIy41MF4p9Mi1
qmELNvjn9K9fwpaeiUG9qT8B0pfq/tTAObG2sZf7B1mFbA3YwEqjhNqLdkoca5swrS0DI1
9OejIVIqjK+bvUZaqUDMxVX7fM6hwRvI9Wd+rwFG+X3wHYNPsZ+Cos8/BNPzIIoOh4SbTr
8vIqWUdPXM4HO26uAAVRKz6FknmwM/GQ7FyJBWgIXgXK51SLn+NcifxO8uywGewHzP00ki
frTPmy0+GrikleWry6BdWkg76hjrjQBalNlSmasi9yp9J8qdzVYvQlOBjS5EKWsvsSpXGY
MIdupkiv4a25aXsgdpGBy4GzcSUDioChq287HBBmYRIMVvp5OYbV3/+ERNhTlCQqb6Ck4g
891l1OJOEoMiDqcbDL8DNftlH4gybEE7zJXQRmmJKyw==
License Agreement: CLOVER VERSION 1 (ONE) SOFTWARE LICENSE AGREEMENT
1. Licenses and Software
Cortex eBusiness Pty Ltd, an Australian Proprietary Limited Company
("CENQUA") hereby grants to the purchaser (the "LICENSEE") a limited,
revocable, worldwide, non-exclusive, non-transferable,
non-sublicensable license to use the Clover version 1 (one) software
(the "Software"), including any minor upgrades thereof during the Term
(hereinafter defined) up to, but not including the next major version
of the Software. The licensee shall not, or knowingly allow others to,
reverse engineer, decompile, disassemble, modify, adapt, create
derivative works from or otherwise attempt to derive source code from
the Software provided. And, in accordance with the terms and
conditions of this Software License Agreement (the "Agreement"), the
Software shall be used solely by the licensed users in accordance with
the following edition specific conditions:
a) Server Edition
A Server Edition license entitles the Licensee to execute one instance
of Clover Server Edition on one (1) machine for the purposes of
instrumenting source code and generating reports. There are no
limitations on the use of the instrumented source code or generated
reports produced by Server Edition.
b) Workstation Edition
A Workstation Edition license entitles the licensee to use Clover
Workstation Edition on one (1) machine by one (1) individual end
user. Workstation Edition does not permit the generation of reports
for distribution.
c) Team Edition
A Team Edition license entitles the licensee to use Clover Team
edition on any number of machines solely by the licensed number of
users. Reports generated by Clover Team Edition are strictly for use
only by the licensed number of individual end users.
2. License Fee
In exchange for the License(s), the Licensee shall pay to Cenqua a
one-time, up front, non-refundable license fee. At the sole discretion
of Cenqua this fee will be waived for non-commercial
projects. Notwithstanding the Licensee's payment of the License Fee,
Cenqua reserves the right to terminate the License if Cenqua discovers
that the Licensee and/or the Licensee's use of the Software is in
breach of this Agreement.
3. Proprietary Rights
Cenqua will retain all right, title and interest in and to the
Software, all copies thereof, and Cenqua website(s), software, and
other intellectual property, including, but not limited to, ownership
of all copyrights, look and feel, trademark rights, design rights,
trade secret rights and any and all other intellectual property and
other proprietary rights therein. The Licensee will not directly or
indirectly obtain or attempt to obtain at any time, any right, title
or interest by registration or otherwise in or to the trademarks,
service marks, copyrights, trade names, symbols, logos or designations
or other intellectual property rights owned or used by Cenqua. All
technical manuals or other information provided by Cenqua to the
Licensee shall be the sole property of Cenqua.
4. Term and Termination
Subject to the other provisions hereof, this Agreement shall commence
upon the Licensee's opting into this Agreement and continue until the
Licensee discontinues use of the Software or the Agreement terminates
automatically upon the Licensee's breach of any term or condition of
this Agreement (the "Term"). Upon any such termination, the Licensee
will delete the Software immediately.
5. Copying & Transfer
The Licensee may copy the Software for back-up purposes only. The
Licensee may not assign or otherwise transfer the Software to any
third party.
6. Specific Disclaimer of Warranty and Limitation of Liability
THE SOFTWARE IS PROVIDED WITHOUT WARRANTY OF ANY KIND. CENQUA
DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE. CENQUA WILL NOT BE LIABLE FOR ANY DAMAGES
ASSOCIATED WITH THE SOFTWARE, INCLUDING, WITHOUT LIMITATION, ORDINARY,
INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES OF ANY KIND, INCLUDING
BUT NOT LIMITED TO DAMAGES RELATING TO LOST DATA OR LOST PROFITS, EVEN
IF CENQUA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. Warranties and Representations
Licensee Indemnification. CENQUA agrees to indemnify, defend and hold
the Licensee harmless from and against any and all liabilities,
damages, losses, claims, costs, and expenses (including reasonable
legal fees) arising out of or resulting from the Software or the use
thereof infringing upon, misappropriating or violating any patents,
copyrights, trademarks, or trade secret rights or other proprietary
rights of persons, firms or entities who are not parties to this
Agreement.
CENQUA Indemnification. The Licensee warrants and represents that the
Licensee's actions with regard to the Software will be in compliance
with all applicable laws; and the Licensee agrees to indemnify,
defend, and hold CENQUA harmless from and against any and all
liabilities, damages, losses, claims, costs, and expenses (including
reasonable legal fees) arising out of or resulting from the
Licensee's failure to observe the use restrictions set forth herein.
8. Publicity
The Licensee grants permission for CENQUA to use Licensee's name
solely in customer lists. CENQUA shall not, without prior consent in
writing, use the Licensee's name, or that of its affiliates, in any
form with the specific exception of customer lists. CENQUA agrees to
remove Licensee's name from any and all materials within 7 days if
notified by the Licensee in writing.
9. Governing Law
This Agreement shall be governed by the laws of New South Wales,
Australia.
10. Independent Contractors
The parties are independent contractors with respect to each other,
and nothing in this Agreement shall be construed as creating an
employer-employee relationship, a partnership, agency relationship or
a joint venture between the parties.
11. Assignment
This Agreement is not assignable or transferable by the Licensee.
CENQUA in its sole discretion may transfer a license to a third party
at the written request of the Licensee.
12. Entire Agreement
This Agreement constitutes the entire agreement between the parties
concerning the Licensee's use of the Software. This Agreement
supersedes any prior verbal understanding between the parties and any
Licensee purchase order or other ordering document, regardless of
whether such document is received by CENQUA before or after execution
of this Agreement. This Agreement may be amended only in writing by
CENQUA.

View File

@ -1,106 +0,0 @@
package org.jasig.cas.client;
import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;
/**
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class PublicTestHttpServer extends Thread {
private static PublicTestHttpServer httpServer;
public byte[] content;
private byte[] header;
private int port = 80;
public String encoding;
private PublicTestHttpServer(String data, String encoding, String MIMEType,
int port) throws UnsupportedEncodingException {
this(data.getBytes(encoding), encoding, MIMEType, port);
}
private PublicTestHttpServer(byte[] data, String encoding, String MIMEType,
int port) throws UnsupportedEncodingException {
this.content = data;
this.port = port;
this.encoding = encoding;
String header = "HTTP/1.0 200 OK\r\n" + "Server: OneFile 1.0\r\n"
// + "Content-length: " + this.content.length + "\r\n"
+ "Content-type: " + MIMEType + "\r\n\r\n";
this.header = header.getBytes("ASCII");
}
public static synchronized PublicTestHttpServer instance() {
if (httpServer == null) {
try {
httpServer = new PublicTestHttpServer("test", "ASCII",
"text/plain", 8085);
} catch (Exception e) {
throw new RuntimeException(e);
}
httpServer.start();
Thread.yield();
}
return httpServer;
}
public void run() {
try {
ServerSocket server = new ServerSocket(this.port);
System.out.println("Accepting connections on port "
+ server.getLocalPort());
while (true) {
Socket connection = null;
try {
connection = server.accept();
OutputStream out = new BufferedOutputStream(connection
.getOutputStream());
InputStream in = new BufferedInputStream(connection
.getInputStream());
// read the first line only; that's all we need
StringBuffer request = new StringBuffer(80);
while (true) {
int c = in.read();
if (c == '\r' || c == '\n' || c == -1)
break;
request.append((char) c);
}
if (request.toString().startsWith("STOP")) {
connection.close();
break;
}
if (request.toString().indexOf("HTTP/") != -1) {
out.write(this.header);
}
out.write(this.content);
out.flush();
} // end try
catch (IOException e) {
// nothing to do with this IOException
} finally {
if (connection != null)
connection.close();
}
} // end while
} // end try
catch (IOException e) {
System.err.println("Could not start server. Port Occupied");
}
} // end run
}

View File

@ -1,37 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.authorization;
import junit.framework.TestCase;
import org.jasig.cas.authentication.principal.SimplePrincipal;
/**
* Abstract test for all AuthorizedDecider implementations.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public abstract class AbstractAuthorizedDeciderTests extends TestCase {
private AuthorizedDecider casAuthorizedDecider;
protected abstract AuthorizedDecider getCasAuthorizedDeciderImpl();
protected final void setUp() throws Exception {
this.casAuthorizedDecider = getCasAuthorizedDeciderImpl();
}
public final void testIsAuthorized() {
assertTrue(this.casAuthorizedDecider
.isAuthorizedToUseApplication(new SimplePrincipal("scott")));
}
public final void testIsNotAuthorized() {
assertFalse(this.casAuthorizedDecider
.isAuthorizedToUseApplication(new SimplePrincipal("not")));
}
}

View File

@ -1,42 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.authorization;
import junit.framework.TestCase;
/**
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class AuthorizationExceptionTests extends TestCase {
private static final String CONST_MESSAGE = "t";
private static final Exception CONST_THROWABLE = new RuntimeException();
public void testMessageThrowable() {
final AuthorizationException e = new AuthorizationException(
CONST_MESSAGE, CONST_THROWABLE);
assertEquals(CONST_MESSAGE, e.getMessage());
assertEquals(CONST_THROWABLE, e.getCause());
}
public void testMessage() {
final AuthorizationException e = new AuthorizationException(
CONST_MESSAGE);
assertEquals(CONST_MESSAGE, e.getMessage());
}
public void testThrowable() {
final AuthorizationException e = new AuthorizationException(
CONST_THROWABLE);
assertEquals(CONST_THROWABLE, e.getCause());
}
}

View File

@ -1,22 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.authorization;
import java.util.ArrayList;
import java.util.List;
public final class DefaultAuthorizedDeciderImplTests extends
AbstractAuthorizedDeciderTests {
public AuthorizedDecider getCasAuthorizedDeciderImpl() {
final List list = new ArrayList();
list.add("scott");
final DefaultAuthorizedDeciderImpl impl = new DefaultAuthorizedDeciderImpl(list);
return impl;
}
}

View File

@ -1,33 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.proxy;
import junit.framework.TestCase;
/**
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public abstract class AbstractProxyGrantingTicketStorageTests extends TestCase {
protected ProxyGrantingTicketStorageImpl proxyGrantingTicketStorageImpl;
public final void testNullValue() {
assertNull(this.proxyGrantingTicketStorageImpl
.retrieve("this should not exist"));
}
public final void testValueExists() {
final String CONST_KEY = "testKey";
final String CONST_VALUE = "testValue";
this.proxyGrantingTicketStorageImpl.save(CONST_KEY, CONST_VALUE);
assertEquals(CONST_VALUE, this.proxyGrantingTicketStorageImpl
.retrieve(CONST_KEY));
}
}

View File

@ -1,21 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.proxy;
/**
* Test cases for the ProxyGrantingTicketStorageImplTests.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class ProxyGrantingTicketStorageImplTests extends
AbstractProxyGrantingTicketStorageTests {
protected void setUp() throws Exception {
this.proxyGrantingTicketStorageImpl = new ProxyGrantingTicketStorageImpl(1000);
}
}

View File

@ -1,96 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.proxy;
import junit.framework.TestCase;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.mock.web.MockServletConfig;
import org.springframework.mock.web.MockServletContext;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.XmlWebApplicationContext;
import javax.servlet.ServletConfig;
public final class SpringConfiguredProxyReceptorServletTests extends TestCase {
private XmlWebApplicationContext webApplicationContext;
public void testNoProxyGrantingTicketStorage() {
AbstractProxyReceptorServlet servlet = new SpringConfiguredProxyReceptorServlet();
try {
servlet
.init(getServletConfig("classpath:badProxyGrantingTicketStorageConfig.xml"));
fail("Exception expected.");
} catch (final Exception e) {
// expected
}
}
public void testTwoProxyGrantingTicketStorage() {
AbstractProxyReceptorServlet servlet = new SpringConfiguredProxyReceptorServlet();
try {
servlet
.init(getServletConfig("classpath:twoProxyGrantingTicketStorageConfig.xml"));
fail("Exception expected.");
} catch (final Exception e) {
// expected
}
}
public void testOneProxyGrantingTicketStorage() {
AbstractProxyReceptorServlet servlet = new SpringConfiguredProxyReceptorServlet();
try {
servlet
.init(getServletConfig("classpath:oneProxyGrantingTicketStorageConfig.xml"));
} catch (final Exception e) {
fail("Unexpected excception.");
}
}
public void testNoPgtOrPgtIouPassed() throws Exception {
final AbstractProxyReceptorServlet servlet = new SpringConfiguredProxyReceptorServlet();
servlet
.init(getServletConfig("classpath:proxyGrantingTicketStorageConfig.xml"));
final MockHttpServletResponse response = new MockHttpServletResponse();
servlet.doGet(new MockHttpServletRequest(), response);
assertEquals("", response.getContentAsString());
}
public void testPgtPassed() throws Exception {
final AbstractProxyReceptorServlet servlet = new SpringConfiguredProxyReceptorServlet();
servlet
.init(getServletConfig("classpath:proxyGrantingTicketStorageConfig.xml"));
final ProxyGrantingTicketStorage storage = (ProxyGrantingTicketStorage) this.webApplicationContext
.getBean("proxyGrantingTicketStorage");
final MockHttpServletRequest request = new MockHttpServletRequest();
request.setParameter("pgtIou", "test");
request.setParameter("pgtId", "testpgtId");
final MockHttpServletResponse response = new MockHttpServletResponse();
servlet.doGet(request, response);
assertTrue(!"".equals(response.getContentAsString()));
assertEquals("testpgtId", storage.retrieve("test"));
}
private ServletConfig getServletConfig(final String contextLocation) {
this.webApplicationContext = new XmlWebApplicationContext();
this.webApplicationContext
.setConfigLocations(new String[]{contextLocation});
this.webApplicationContext.refresh();
MockServletContext context = new MockServletContext();
context.setAttribute(
WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE,
this.webApplicationContext);
return new MockServletConfig(context);
}
}

View File

@ -1,91 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.util;
import junit.framework.TestCase;
import java.util.ArrayList;
import java.util.Collection;
/**
* Tests for the CommonUtils.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class CommonUtilsTests extends TestCase {
public void testAssertNotNull() {
final String CONST_MESSAGE = "test";
CommonUtils.assertNotNull(new Object(), CONST_MESSAGE);
try {
CommonUtils.assertNotNull(null, CONST_MESSAGE);
} catch (IllegalArgumentException e) {
assertEquals(CONST_MESSAGE, e.getMessage());
}
}
public void testAssertNotEmpty() {
final String CONST_MESSAGE = "test";
final Collection c = new ArrayList();
c.add(new Object());
CommonUtils.assertNotEmpty(c, CONST_MESSAGE);
try {
CommonUtils.assertNotEmpty(new ArrayList(), CONST_MESSAGE);
} catch (IllegalArgumentException e) {
assertEquals(CONST_MESSAGE, e.getMessage());
}
try {
CommonUtils.assertNotEmpty(null, CONST_MESSAGE);
} catch (IllegalArgumentException e) {
assertEquals(CONST_MESSAGE, e.getMessage());
}
}
public void testAssertTrue() {
final String CONST_MESSAGE = "test";
CommonUtils.assertTrue(true, CONST_MESSAGE);
try {
CommonUtils.assertTrue(false, CONST_MESSAGE);
} catch (IllegalArgumentException e) {
assertEquals(CONST_MESSAGE, e.getMessage());
}
}
public void testIsEmpty() {
assertFalse(CommonUtils.isEmpty("test"));
assertFalse(CommonUtils.isEmpty(" test"));
assertTrue(CommonUtils.isEmpty(""));
assertTrue(CommonUtils.isEmpty(null));
assertFalse(CommonUtils.isEmpty(" "));
}
public void testIsNotEmpty() {
assertTrue(CommonUtils.isNotEmpty("test"));
assertTrue(CommonUtils.isNotEmpty(" test"));
assertFalse(CommonUtils.isNotEmpty(""));
assertFalse(CommonUtils.isNotEmpty(null));
assertTrue(CommonUtils.isNotEmpty(" "));
}
public void testIsBlank() {
assertFalse(CommonUtils.isBlank("test"));
assertFalse(CommonUtils.isBlank(" test"));
assertTrue(CommonUtils.isBlank(""));
assertTrue(CommonUtils.isBlank(null));
assertTrue(CommonUtils.isBlank(" "));
}
public void testIsNotBlank() {
assertTrue(CommonUtils.isNotBlank("test"));
assertTrue(CommonUtils.isNotBlank(" test"));
assertFalse(CommonUtils.isNotBlank(""));
assertFalse(CommonUtils.isNotBlank(null));
assertFalse(CommonUtils.isNotBlank(" "));
}
}

View File

@ -1,141 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.util;
import junit.framework.TestCase;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
/**
* Test Cases for <code>DelegatingFilter</code>
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class DelegatingFilterTests extends TestCase {
private DelegatingFilter delegatingFilter;
protected int filterExecuted = -1;
protected void setUp() throws Exception {
final Map delegators = new HashMap();
delegators.put("1", new TestFilter(1));
this.filterExecuted = -1;
this.delegatingFilter = new DelegatingFilter("test", delegators, true, new TestFilter(0));
this.delegatingFilter.init(null);
}
protected void tearDown() throws Exception {
this.delegatingFilter.destroy();
}
public void testExactMatchFound() throws Exception {
final MockHttpServletRequest request = new MockHttpServletRequest();
request.addParameter("test", "1");
this.delegatingFilter.doFilter(request, new MockHttpServletResponse(),
null);
assertEquals(1, this.filterExecuted);
}
public void testNoMatchFound() throws Exception {
final MockHttpServletRequest request = new MockHttpServletRequest();
request.addParameter("test", "0");
this.delegatingFilter.doFilter(request, new MockHttpServletResponse(),
null);
assertEquals(0, this.filterExecuted);
}
public void testNoParam() throws Exception {
this.delegatingFilter.doFilter(new MockHttpServletRequest(),
new MockHttpServletResponse(), null);
assertEquals(0, this.filterExecuted);
}
public void testRegularExpressionMatch() throws Exception {
final Map delegators = new HashMap();
delegators.put("1.*", new TestFilter(1));
this.delegatingFilter = new DelegatingFilter("test", delegators, false, new TestFilter(0));
MockHttpServletRequest request = new MockHttpServletRequest();
request.addParameter("test", "1");
this.delegatingFilter.doFilter(request, new MockHttpServletResponse(),
null);
assertEquals(1, this.filterExecuted);
request = new MockHttpServletRequest();
request.addParameter("test", "15");
this.delegatingFilter.doFilter(request, new MockHttpServletResponse(),
null);
assertEquals(1, this.filterExecuted);
request = new MockHttpServletRequest();
request.addParameter("test", "0");
this.delegatingFilter.doFilter(request, new MockHttpServletResponse(),
null);
assertEquals(0, this.filterExecuted);
}
public void testForIllegalArgument() {
Map map = new HashMap();
map.put("test", new Object());
try {
this.delegatingFilter = new DelegatingFilter("test", map, false, new TestFilter(0));
fail("Exception expected.");
} catch (IllegalArgumentException e) {
// expected
}
}
private final class TestFilter implements Filter {
private final int i;
public TestFilter(final int i) {
this.i = i;
}
public void destroy() {
// nothing to do here
}
public void doFilter(ServletRequest arg0, ServletResponse arg1,
FilterChain arg2) throws IOException, ServletException {
DelegatingFilterTests.this.filterExecuted = this.i;
}
public void init(FilterConfig arg0) throws ServletException {
// nothing to do
}
}
}

View File

@ -1,22 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.validation;
import junit.framework.TestCase;
/**
* Base class for all TicketValidator tests to inherit from.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public abstract class AbstractTicketValidatorTests extends TestCase {
protected static final String CONST_CAS_SERVER_URL = "http://localhost:8085/";
protected static final String CONST_USERNAME = "username";
}

View File

@ -1,50 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.validation;
import junit.framework.TestCase;
import org.jasig.cas.authentication.principal.Principal;
import org.jasig.cas.authentication.principal.SimplePrincipal;
import org.jasig.cas.authentication.principal.SimpleService;
import java.util.HashMap;
import java.util.Map;
/**
* Test cases for the {@link AssertionImpl}.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class AssertionImplTests extends TestCase {
private static final Principal CONST_PRINCIPAL = new SimplePrincipal("test");
private static final String CONST_PROXY_GRANTING_TICKET_IOU = "proxyGrantingTicketIou";
private static final Map CONST_ATTRIBUTES = new HashMap();
static {
CONST_ATTRIBUTES.put("test", "test");
}
public void testPrincipalConstructor() {
final Assertion assertion = new AssertionImpl(CONST_PRINCIPAL);
assertEquals(CONST_PRINCIPAL, assertion.getPrincipal());
assertTrue(assertion.getAttributes().isEmpty());
assertNull(assertion.getProxyTicketFor(new SimpleService("test")));
}
public void testCompleteConstructor() {
final Assertion assertion = new AssertionImpl(CONST_PRINCIPAL,
CONST_ATTRIBUTES);
assertEquals(CONST_PRINCIPAL, assertion.getPrincipal());
assertEquals(CONST_ATTRIBUTES, assertion.getAttributes());
}
}

View File

@ -1,66 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.validation;
import org.apache.commons.httpclient.HttpClient;
import org.jasig.cas.authentication.principal.SimpleService;
import org.jasig.cas.client.PublicTestHttpServer;
import java.io.UnsupportedEncodingException;
/**
* Test cases for the {@link Cas10TicketValidator}.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class Cas10TicketValidatorTests extends AbstractTicketValidatorTests {
private Cas10TicketValidator ticketValidator;
public Cas10TicketValidatorTests() {
super();
}
protected void setUp() throws Exception {
this.ticketValidator = new Cas10TicketValidator(CONST_CAS_SERVER_URL, true, new HttpClient());
}
public void testNoResponse() throws Exception {
PublicTestHttpServer.instance().content = "no\n\n"
.getBytes(PublicTestHttpServer.instance().encoding);
try {
this.ticketValidator.validate("testTicket", new SimpleService(
"myService"));
fail("ValidationException expected.");
} catch (final ValidationException e) {
// expected
}
}
public void testYesResponse() throws ValidationException,
UnsupportedEncodingException {
PublicTestHttpServer.instance().content = "yes\nusername\n\n"
.getBytes(PublicTestHttpServer.instance().encoding);
final Assertion assertion = this.ticketValidator.validate("testTicket",
new SimpleService("myService"));
assertEquals(CONST_USERNAME, assertion.getPrincipal().getId());
}
public void testBadResponse() throws UnsupportedEncodingException {
PublicTestHttpServer.instance().content = "falalala\n\n"
.getBytes(PublicTestHttpServer.instance().encoding);
try {
this.ticketValidator.validate("testTicket", new SimpleService(
"myService"));
fail("ValidationException expected.");
} catch (final ValidationException e) {
// expected
}
}
}

View File

@ -1,87 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.validation;
import org.apache.commons.httpclient.HttpClient;
import org.jasig.cas.authentication.principal.Service;
import org.jasig.cas.authentication.principal.SimpleService;
import org.jasig.cas.client.PublicTestHttpServer;
import org.jasig.cas.client.proxy.ProxyGrantingTicketStorage;
import org.jasig.cas.client.proxy.ProxyGrantingTicketStorageImpl;
import org.jasig.cas.client.proxy.ProxyRetriever;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.List;
/**
* Test cases for the {@link Cas20ProxyTicketValidator}.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class Cas20ProxyTicketValidatorTests extends
AbstractTicketValidatorTests {
private Cas20ProxyTicketValidator ticketValidator;
public Cas20ProxyTicketValidatorTests() {
super();
}
protected void setUp() throws Exception {
final ProxyGrantingTicketStorage proxyGrantingTicketStorage = getProxyGrantingTicketStorage();
final List list = new ArrayList();
list.add("proxy1 proxy2 proxy3");
this.ticketValidator = new Cas20ProxyTicketValidator(CONST_CAS_SERVER_URL, true, new HttpClient(), new SimpleService("test"), list, false, getProxyGrantingTicketStorage(), getProxyRetriever());
}
private ProxyGrantingTicketStorage getProxyGrantingTicketStorage() {
final ProxyGrantingTicketStorageImpl proxyGrantingTicketStorageImpl = new ProxyGrantingTicketStorageImpl();
return proxyGrantingTicketStorageImpl;
}
private ProxyRetriever getProxyRetriever() {
final ProxyRetriever proxyRetriever = new ProxyRetriever() {
public String getProxyTicketIdFor(String proxyGrantingTicketId, Service targetService) {
return "test";
}
};
return proxyRetriever;
}
public void testProxyChainWithValidProxy() throws ValidationException,
UnsupportedEncodingException {
final String USERNAME = "username";
final String RESPONSE = "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'><cas:authenticationSuccess><cas:user>username</cas:user><cas:proxyGrantingTicket>PGTIOU-84678-8a9d...</cas:proxyGrantingTicket><cas:proxies><cas:proxy>proxy1</cas:proxy><cas:proxy>proxy2</cas:proxy><cas:proxy>proxy3</cas:proxy></cas:proxies></cas:authenticationSuccess></cas:serviceResponse>";
PublicTestHttpServer.instance().content = RESPONSE
.getBytes(PublicTestHttpServer.instance().encoding);
final Assertion assertion = this.ticketValidator.validate("test",
new SimpleService("test"));
assertEquals(USERNAME, assertion.getPrincipal().getId());
}
public void testProxyChainWithInvalidProxy() throws ValidationException,
UnsupportedEncodingException {
final String RESPONSE = "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'><cas:authenticationSuccess><cas:user>username</cas:user><cas:proxyGrantingTicket>PGTIOU-84678-8a9d...</cas:proxyGrantingTicket><cas:proxies><cas:proxy>proxy7</cas:proxy><cas:proxy>proxy2</cas:proxy><cas:proxy>proxy3</cas:proxy></cas:proxies></cas:authenticationSuccess></cas:serviceResponse>";
PublicTestHttpServer.instance().content = RESPONSE
.getBytes(PublicTestHttpServer.instance().encoding);
try {
this.ticketValidator.validate("test", new SimpleService("test"));
fail("Invalid proxy chain");
} catch (InvalidProxyChainValidationException e) {
// expected
}
}
}

View File

@ -1,124 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.validation;
import org.apache.commons.httpclient.HttpClient;
import org.jasig.cas.authentication.principal.Service;
import org.jasig.cas.authentication.principal.SimpleService;
import org.jasig.cas.client.PublicTestHttpServer;
import org.jasig.cas.client.proxy.ProxyGrantingTicketStorage;
import org.jasig.cas.client.proxy.ProxyGrantingTicketStorageImpl;
import org.jasig.cas.client.proxy.ProxyRetriever;
import java.io.UnsupportedEncodingException;
/**
* Test cases for the {@link Cas20ServiceTicketValidator}.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class Cas20ServiceTicketValidatorTests extends
AbstractTicketValidatorTests {
private Cas20ServiceTicketValidator ticketValidator;
private ProxyGrantingTicketStorage proxyGrantingTicketStorage;
private ProxyRetriever proxyRetriever;
public Cas20ServiceTicketValidatorTests() {
super();
}
public Cas20ServiceTicketValidatorTests(Cas20ServiceTicketValidator ticketValidator) {
this.ticketValidator = ticketValidator;
}
protected void setUp() throws Exception {
this.proxyGrantingTicketStorage = getProxyGrantingTicketStorage();
this.ticketValidator = new Cas20ServiceTicketValidator(CONST_CAS_SERVER_URL, true, new HttpClient(), new SimpleService("test"), this.proxyGrantingTicketStorage, getProxyRetriever());
}
private ProxyGrantingTicketStorage getProxyGrantingTicketStorage() {
final ProxyGrantingTicketStorageImpl proxyGrantingTicketStorageImpl = new ProxyGrantingTicketStorageImpl();
return proxyGrantingTicketStorageImpl;
}
private ProxyRetriever getProxyRetriever() {
final ProxyRetriever proxyRetriever = new ProxyRetriever() {
public String getProxyTicketIdFor(String proxyGrantingTicketId, Service targetService) {
return "test";
}
};
return proxyRetriever;
}
public void testNoResponse() throws UnsupportedEncodingException {
final String RESPONSE = "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'><cas:authenticationFailure code=\"INVALID_TICKET\">Ticket ST-1856339-aA5Yuvrxzpv8Tau1cYQ7 not recognized</cas:authenticationFailure></cas:serviceResponse>";
PublicTestHttpServer.instance().content = RESPONSE
.getBytes(PublicTestHttpServer.instance().encoding);
try {
this.ticketValidator.validate("test", new SimpleService("test"));
fail("ValidationException expected due to 'no' response");
} catch (final ValidationException e) {
// expected
}
}
public void testYesResponseButNoPgt() throws ValidationException,
UnsupportedEncodingException {
final String USERNAME = "username";
final String RESPONSE = "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'><cas:authenticationSuccess><cas:user>"
+ USERNAME
+ "</cas:user></cas:authenticationSuccess></cas:serviceResponse>";
PublicTestHttpServer.instance().content = RESPONSE
.getBytes(PublicTestHttpServer.instance().encoding);
final Assertion assertion = this.ticketValidator.validate("test",
new SimpleService("test"));
assertEquals(USERNAME, assertion.getPrincipal().getId());
}
public void testYesResponseWithPgt() throws ValidationException,
UnsupportedEncodingException {
final String USERNAME = "username";
final String PGTIOU = "testPgtIou";
final String PGT = "test";
final String RESPONSE = "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'><cas:authenticationSuccess><cas:user>"
+ USERNAME
+ "</cas:user><cas:proxyGrantingTicket>"
+ PGTIOU
+ "</cas:proxyGrantingTicket></cas:authenticationSuccess></cas:serviceResponse>";
PublicTestHttpServer.instance().content = RESPONSE
.getBytes(PublicTestHttpServer.instance().encoding);
this.proxyGrantingTicketStorage.save(PGTIOU, PGT);
final Assertion assertion = this.ticketValidator.validate("test",
new SimpleService("test"));
assertEquals(USERNAME, assertion.getPrincipal().getId());
// assertEquals(PGT, assertion.getProxyGrantingTicketId());
}
public void testInvalidResponse() throws Exception {
final String RESPONSE = "<root />";
PublicTestHttpServer.instance().content = RESPONSE
.getBytes(PublicTestHttpServer.instance().encoding);
try {
this.ticketValidator.validate("test", new SimpleService("test"));
fail("ValidationException expected due to invalid response.");
} catch (final ValidationException e) {
// expected
}
}
}

View File

@ -1,56 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.validation;
import junit.framework.TestCase;
import org.jasig.cas.web.view.Saml10SuccessResponseView;
import org.jasig.cas.authentication.Authentication;
import org.jasig.cas.authentication.ImmutableAuthentication;
import org.jasig.cas.authentication.principal.SimplePrincipal;
import org.jasig.cas.authentication.principal.SimpleService;
import org.jasig.cas.validation.ImmutableAssertionImpl;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.apache.commons.httpclient.HttpClient;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
import java.util.ArrayList;
/**
* Test cases for the {@link org.jasig.cas.client.validation.Saml10TicketValidator}.
*
* @author Scott Battaglia
* @version $Revision: 11737 $ $Date: 2006-10-03 09:14:02 -0400 (Tue, 03 Oct 2006) $
* @since 3.1
*/
public class SamlTicketValidatorTests extends TestCase {
final Saml10TicketValidator validator = new Saml10TicketValidator("https://cas.rutgers.edu", new HttpClient());
/*
public void testValidationWithTicketIdWithPlus() throws Exception {
final Saml10SuccessResponseView view = new Saml10SuccessResponseView();
final MockHttpServletRequest request = new MockHttpServletRequest();
final MockHttpServletResponse response = new MockHttpServletResponse();
final Map model = new HashMap();
final Authentication authentication = new ImmutableAuthentication(new SimplePrincipal("test"));
final List authentications = new ArrayList();
authentications.add(authentication);
final ImmutableAssertionImpl assertion = new ImmutableAssertionImpl(authentications, new SimpleService("test"), true);
model.put("assertion", assertion);
request.addParameter("SAMLArt", "AAIYG64MrQ2+793pMM8J0sRjXf6uG2h0dHBzOi8vbG9jYWxob3N0Ojg0NDM=");
view.setIssuer("https://cas.rutgers.edu");
view.render(model, request, response);
final String content = response.getContentAsString();
Assertion assertionResponse = validator.parseResponse(content);
assertEquals("test", assertionResponse.getPrincipal().getId());
} */
}

View File

@ -1,159 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.web.filter;
import junit.framework.TestCase;
import org.jasig.cas.authentication.principal.SimplePrincipal;
import org.jasig.cas.client.validation.AssertionImpl;
import org.springframework.mock.web.MockFilterConfig;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.mock.web.MockHttpSession;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
/**
* Tests for the AuthenticationFilter.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class AuthenticationFilterTests extends TestCase {
private static final String CAS_SERVICE_URL = "https://localhost:8443/service";
private static final String CAS_LOGIN_URL = "https://localhost:8443/cas/login";
private AuthenticationFilter filter;
protected void setUp() throws Exception {
this.filter = new AuthenticationFilter(CAS_SERVICE_URL, false, CAS_LOGIN_URL);
this.filter.init(new MockFilterConfig());
}
protected void tearDown() throws Exception {
this.filter.destroy();
}
public void testRedirect() throws Exception {
final MockHttpSession session = new MockHttpSession();
final MockHttpServletRequest request = new MockHttpServletRequest();
final MockHttpServletResponse response = new MockHttpServletResponse();
final FilterChain filterChain = new FilterChain() {
public void doFilter(ServletRequest arg0, ServletResponse arg1)
throws IOException, ServletException {
// nothing to do
}
};
request.setSession(session);
this.filter.doFilter(request, response, filterChain);
assertEquals(CAS_LOGIN_URL + "?service="
+ URLEncoder.encode(CAS_SERVICE_URL, "UTF-8"), response
.getRedirectedUrl());
}
public void testRedirectWithQueryString() throws Exception {
final MockHttpSession session = new MockHttpSession();
final MockHttpServletRequest request = new MockHttpServletRequest();
final MockHttpServletResponse response = new MockHttpServletResponse();
request.setQueryString("test=12456");
request.setRequestURI("/test");
request.setSecure(true);
final FilterChain filterChain = new FilterChain() {
public void doFilter(ServletRequest arg0, ServletResponse arg1)
throws IOException, ServletException {
// nothing to do
}
};
request.setSession(session);
this.filter = new AuthenticationFilter("localhost:8443", true, CAS_LOGIN_URL);
this.filter.doFilter(request, response, filterChain);
assertEquals(CAS_LOGIN_URL
+ "?service="
+ URLEncoder.encode("https://localhost:8443"
+ request.getRequestURI() + "?" + request.getQueryString(),
"UTF-8"), response.getRedirectedUrl());
}
public void testAssertion() throws Exception {
final MockHttpSession session = new MockHttpSession();
final MockHttpServletRequest request = new MockHttpServletRequest();
final MockHttpServletResponse response = new MockHttpServletResponse();
final FilterChain filterChain = new FilterChain() {
public void doFilter(ServletRequest arg0, ServletResponse arg1)
throws IOException, ServletException {
// nothing to do
}
};
request.setSession(session);
session.setAttribute(AbstractCasFilter.CONST_ASSERTION,
new AssertionImpl(new SimplePrincipal("test")));
this.filter.doFilter(request, response, filterChain);
assertNull(response.getRedirectedUrl());
}
public void testRenew() throws Exception {
final MockHttpSession session = new MockHttpSession();
final MockHttpServletRequest request = new MockHttpServletRequest();
final MockHttpServletResponse response = new MockHttpServletResponse();
final FilterChain filterChain = new FilterChain() {
public void doFilter(ServletRequest arg0, ServletResponse arg1)
throws IOException, ServletException {
// nothing to do
}
};
this.filter = new AuthenticationFilter("localhost:8443", true, CAS_LOGIN_URL);
this.filter.setRenew(true);
request.setSession(session);
this.filter.doFilter(request, response, filterChain);
assertNotNull(response.getRedirectedUrl());
assertTrue(response.getRedirectedUrl().indexOf("renew=true") != -1);
}
public void testGateway() throws Exception {
final MockHttpSession session = new MockHttpSession();
final MockHttpServletRequest request = new MockHttpServletRequest();
final MockHttpServletResponse response = new MockHttpServletResponse();
final FilterChain filterChain = new FilterChain() {
public void doFilter(ServletRequest arg0, ServletResponse arg1)
throws IOException, ServletException {
// nothing to do
}
};
request.setSession(session);
this.filter = new AuthenticationFilter("localhost:8443", true, CAS_LOGIN_URL);
this.filter.setRenew(true);
this.filter.setGateway(true);;
this.filter.doFilter(request, response, filterChain);
assertNotNull(session.getAttribute(AbstractCasFilter.CONST_GATEWAY));
assertNotNull(response.getRedirectedUrl());
final MockHttpServletResponse response2 = new MockHttpServletResponse();
this.filter.doFilter(request, response2, filterChain);
assertNull(session.getAttribute(AbstractCasFilter.CONST_GATEWAY));
assertNull(response2.getRedirectedUrl());
}
}

View File

@ -1,107 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.web.filter;
import junit.framework.TestCase;
import org.jasig.cas.authentication.principal.Principal;
import org.jasig.cas.authentication.principal.SimplePrincipal;
import org.jasig.cas.client.authorization.AuthorizationException;
import org.jasig.cas.client.authorization.AuthorizedDecider;
import org.jasig.cas.client.validation.AssertionImpl;
import org.springframework.mock.web.MockFilterConfig;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.mock.web.MockHttpSession;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import java.io.IOException;
/**
* Tests for the AuthorizationFilter.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class AuthorizationFilterTests extends TestCase {
private AuthorizationFilter casAuthorizationFilter;
protected void setUp() throws Exception {
this.casAuthorizationFilter = new AuthorizationFilter(new AuthorizedDecider() {
public boolean isAuthorizedToUseApplication(Principal principal) {
return principal.getId().equals("scott");
}
});
this.casAuthorizationFilter.init(new MockFilterConfig());
}
protected void tearDown() throws Exception {
this.casAuthorizationFilter.destroy();
}
public void testSuccesfulAuthorization() {
final MockHttpServletRequest request = new MockHttpServletRequest();
final MockHttpServletResponse response = new MockHttpServletResponse();
final MockHttpSession session = new MockHttpSession();
request.setSession(session);
session.setAttribute(AbstractCasFilter.CONST_ASSERTION,
new AssertionImpl(new SimplePrincipal("scott")));
try {
this.casAuthorizationFilter.doFilter(request, response,
new FilterChain() {
public void doFilter(ServletRequest arg0,
ServletResponse arg1) throws IOException,
ServletException {
// nothing to do
}
});
} catch (Exception e) {
fail("No exception expected");
}
}
public void testFailedAuthorization() {
final MockHttpServletRequest request = new MockHttpServletRequest();
final MockHttpServletResponse response = new MockHttpServletResponse();
final MockHttpSession session = new MockHttpSession();
request.setSession(session);
session.setAttribute(AbstractCasFilter.CONST_ASSERTION,
new AssertionImpl(new SimplePrincipal("test")));
try {
this.casAuthorizationFilter.doFilter(request, response, null);
fail("ServletException expected.");
} catch (AuthorizationException e) {
// expectd
} catch (Exception e) {
fail("AuthorizationException expected, not IOException.");
}
}
public void testNoAssertionFound() {
final MockHttpServletRequest request = new MockHttpServletRequest();
final MockHttpServletResponse response = new MockHttpServletResponse();
final MockHttpSession session = new MockHttpSession();
request.setSession(session);
try {
this.casAuthorizationFilter.doFilter(request, response, null);
fail("ServletException expected.");
} catch (Exception e) {
// expected
}
}
}

View File

@ -1,61 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.web.filter;
import junit.framework.TestCase;
import org.jasig.cas.authentication.principal.SimplePrincipal;
import org.jasig.cas.client.validation.AssertionImpl;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.mock.web.MockHttpSession;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
/**
* Tests for the HttpServletRequestWrapperFilter.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class HttpServletRequestWrapperFilterTests extends TestCase {
private HttpServletRequestWrapperFilter filter = new HttpServletRequestWrapperFilter();
protected HttpServletRequest mockRequest;
protected void setUp() throws Exception {
this.filter.init(null);
this.filter.destroy();
}
public void testWrappedRequest() throws Exception {
final MockHttpServletRequest request = new MockHttpServletRequest();
final MockHttpSession session = new MockHttpSession();
final FilterChain filterChain = new FilterChain() {
public void doFilter(ServletRequest request,
ServletResponse response) throws IOException, ServletException {
HttpServletRequestWrapperFilterTests.this.mockRequest = (HttpServletRequest) request;
}
};
session.setAttribute(AbstractCasFilter.CONST_ASSERTION,
new AssertionImpl(new SimplePrincipal("test")));
request.setSession(session);
this.filter.doFilter(request, new MockHttpServletResponse(),
filterChain);
assertEquals("test", this.mockRequest.getRemoteUser());
}
}

View File

@ -1,117 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.web.filter;
import junit.framework.TestCase;
import org.jasig.cas.authentication.principal.Service;
import org.jasig.cas.authentication.principal.SimplePrincipal;
import org.jasig.cas.client.validation.Assertion;
import org.jasig.cas.client.validation.AssertionImpl;
import org.jasig.cas.client.validation.TicketValidator;
import org.jasig.cas.client.validation.ValidationException;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.mock.web.MockHttpSession;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import java.io.IOException;
/**
* Tests for the TicketValidationFilter.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class ValidationFilterTests extends TestCase {
private TicketValidationFilter filter;
protected void setUp() throws Exception {
this.filter = new TicketValidationFilter("localhost:8443", true, new TicketValidator() {
public Assertion validate(final String ticketId,
final Service service) throws ValidationException {
if (ticketId.equals("true")) {
return new AssertionImpl(new SimplePrincipal("test"));
}
throw new ValidationException("error validating ticket.");
}
});
}
protected void tearDown() throws Exception {
this.filter.destroy();
}
public void testNoTicket() throws Exception {
final MockHttpServletRequest request = new MockHttpServletRequest();
final MockHttpServletResponse response = new MockHttpServletResponse();
final MockHttpSession session = new MockHttpSession();
request.setSession(session);
final FilterChain filterChain = new FilterChain() {
public void doFilter(final ServletRequest arg0,
final ServletResponse arg1) throws IOException,
ServletException {
// nothing to do
}
};
this.filter.doFilter(request, response, filterChain);
assertNull(session.getAttribute(AbstractCasFilter.CONST_ASSERTION));
}
public void testValidationSuccess() throws Exception {
final MockHttpServletRequest request = new MockHttpServletRequest();
final MockHttpServletResponse response = new MockHttpServletResponse();
final MockHttpSession session = new MockHttpSession();
request.setSession(session);
request.setParameter("ticket", "true");
final FilterChain filterChain = new FilterChain() {
public void doFilter(final ServletRequest arg0,
final ServletResponse arg1) throws IOException,
ServletException {
// nothing to do
}
};
this.filter.doFilter(request, response, filterChain);
assertNotNull(session.getAttribute(AbstractCasFilter.CONST_ASSERTION));
assertNull(response.getRedirectedUrl());
}
public void testValidationFailure() throws Exception {
final MockHttpServletRequest request = new MockHttpServletRequest();
final MockHttpServletResponse response = new MockHttpServletResponse();
final MockHttpSession session = new MockHttpSession();
request.setSession(session);
request.setParameter("ticket", "false");
final FilterChain filterChain = new FilterChain() {
public void doFilter(final ServletRequest arg0,
final ServletResponse arg1) throws IOException,
ServletException {
// nothing to do
}
};
try {
this.filter.doFilter(request, response, filterChain);
fail("Exception expected.");
} catch (final ServletException e) {
assertTrue(e.getRootCause().getClass().isAssignableFrom(
ValidationException.class));
// expected
}
}
}

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
</beans>

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="proxyGrantingTicketStorage2"
class="org.jasig.cas.client.proxy.ProxyGrantingTicketStorageImpl">
</bean>
</beans>

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="proxyGrantingTicketStorage"
class="org.jasig.cas.client.proxy.ProxyGrantingTicketStorageImpl">
</bean>
</beans>

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="proxyGrantingTicketStorage1"
class="org.jasig.cas.client.proxy.ProxyGrantingTicketStorageImpl">
</bean>
<bean id="proxyGrantingTicketStorage2"
class="org.jasig.cas.client.proxy.ProxyGrantingTicketStorageImpl">
</bean>
</beans>

View File

@ -1,29 +0,0 @@
License for Use
Copyright (c) 2000 The JA-SIG Collaborative. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Redistributions of any form whatsoever must retain the following
acknowledgment:
"This product includes software developed by the JA-SIG Collaborative
(http://www.ja-sig.org/)."
This software is provided by the JA-SIG collaborative "as is" and any expressed
or implied warranties, including, but not limited to, the implied warranties of
merchantability and fitness for a particular purpose are disclaimed. In no
event shall the JA-SIG collaborative or its contributors be liable for any
direct, indirect, incidental, special, exemplary, or consequential damages
(including, but not limited to, procurement of substitute goods or services;
loss of use, data, or profits; or business interruption) however caused and on
any theory of liability, whether in contract, strict liability, or tort
(including negligence or otherwise) arising in any way out of the use of this
software, even if advised of the possibility of such damage.

View File

@ -1,28 +0,0 @@
CENTRAL AUTHENTICATION SERVICE (CAS)
--------------------------------------------------------------------
http://www.ja-sig.org/products/cas/
1. INTRODUCTION
The Central Authentication Service (CAS) is the standard mechanism by which web
applications should authenticate users. Any custom applications written benefit
from using CAS.
Note that CAS provides authentication; that is, it determines that your users
are who they say they are. CAS should not be viewed as an access-control system;
in particular, providers of applications that grant access to anyone who
possesses a NetID should understand that loose affiliates of an organization may
be granted NetIDs.
The JA-SIG CAS Client for Java is a support library for Java applications to communicate
with the CAS server.
2. RELEASE INFO
CAS requires J2SE 1.4 and J2EE1.3.
Release conents:
* "src/main/java" contains the Java source files for the framework
* "src/test/java" contains the Java source files for CAS's test suite

View File

@ -1,129 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4" relativePaths="false" type="JAVA_MODULE">
<component name="ModuleRootManager" />
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/target/classes" />
<exclude-output />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="jdk" jdkName="1.6" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="cas-client-core" />
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/commons-codec/commons-codec/1.3/commons-codec-1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/org/springframework/spring-beans/2.0.2/spring-beans-2.0.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/org/jasig/uportal/uportal/2.5.3-rc1/uportal-2.5.3-rc1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/org/springframework/spring-web/2.0.2/spring-web-2.0.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/commons-logging/commons-logging/1.1/commons-logging-1.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/commons-httpclient/commons-httpclient-contrib/3.0/commons-httpclient-contrib-3.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/org/springframework/spring-core/2.0.2/spring-core-2.0.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/commons-httpclient/commons-httpclient/3.0.1/commons-httpclient-3.0.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/org/springframework/spring-mock/2.0.2/spring-mock-2.0.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/org/jasig/cas/cas-server-core/3.1-m1/cas-server-core-3.1-m1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntryProperties />
</component>
</module>

View File

@ -1,109 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.jasig.cas</groupId>
<artifactId>cas-client</artifactId>
<version>3.1-m1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jasig.cas</groupId>
<artifactId>cas-client-uportal</artifactId>
<packaging>jar</packaging>
<version>3.1-SNAPSHOT</version>
<name>JA-SIG CAS Client for Java - uPortal Integration</name>
<url>http://www.ja-sig.org/products/cas/</url>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<testResources>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.4</source>
<target>1.4</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*Tests*</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clover-plugin</artifactId>
<configuration>
<licenseLocation>${basedir}/src/test/clover/clover.license</licenseLocation>
</configuration>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>instrument</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.jasig.uportal</groupId>
<artifactId>uportal</artifactId>
<version>2.5.3-rc1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jasig.cas</groupId>
<artifactId>cas-client-core</artifactId>
<version>3.1-m1</version>
</dependency>
</dependencies>
<reporting>
<excludeDefaults>false</excludeDefaults>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clover-plugin</artifactId>
<configuration>
<licenseLocation>${basedir}/src/test/clover/clover.license</licenseLocation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<minmemory>128m</minmemory>
<maxmemory>512m</maxmemory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jdepend-maven-plugin</artifactId>
</plugin>
</plugins>
</reporting>
</project>

View File

@ -1,70 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.integration.uportal;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jasig.cas.authentication.principal.Service;
import org.jasig.cas.client.validation.TicketValidator;
import org.jasig.portal.security.ISecurityContextFactory;
import org.jasig.portal.security.InitialSecurityContextFactory;
import org.jasig.portal.spring.PortalApplicationContextFacade;
/**
* Abstract implementation of a SecurityContextFactory that can load all the dependences if a
* CasSecurityCcontext.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public abstract class AbstractCasSecurityContextFactory extends
InitialSecurityContextFactory implements ISecurityContextFactory {
/**
* Spring Bean ID for the Ticket Validator.
*/
public static final String CONST_CAS_TICKET_VALIDATOR = "casTicketValidator";
/**
* Spring Bean ID for the Service.
*/
public static final String CONST_CAS_SERVICE = "casService";
/**
* Spring Bean ID for the ProxyGrantingTicketStorage.
*/
public static final String CONST_CAS_PROXY_GRANTING_TICKET_STORAGE = "casProxyGrantingTicketStorage";
/**
* Instance of Commons Logging.
*/
protected final Log log = LogFactory.getLog(this.getClass());
/**
* The Ticket Validator referenced by the constant
* <code>CONST_CAS_TICKET_VALIDATOR</code>.
*/
protected final TicketValidator ticketValidator;
/**
* The Service referenced by the constant <code>CONST_CAS_SERVICE</code>.
*/
protected final Service service;
/**
* Default constructor retrieves and caches results from looking up entries
* in the PortalApplicationContext for the Ticket Validator, Proxy Retriever
* and Service.
*/
public AbstractCasSecurityContextFactory() {
this.ticketValidator = (TicketValidator) PortalApplicationContextFacade
.getPortalApplicationContext().getBean(CONST_CAS_TICKET_VALIDATOR);
this.service = (Service) PortalApplicationContextFacade
.getPortalApplicationContext().getBean(CONST_CAS_SERVICE);
}
}

View File

@ -1,86 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.integration.uportal;
import org.jasig.cas.authentication.principal.SimpleService;
import org.jasig.portal.ChannelRuntimeData;
import org.jasig.portal.ChannelStaticData;
import org.jasig.portal.security.ISecurityContext;
import org.jasig.portal.security.LocalConnectionContext;
import java.util.Enumeration;
/**
* Extension to LocalConnectionContext that will retrieve and append a proxy
* ticket to a given descriptor.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class CasConnectionContext extends LocalConnectionContext {
/**
* Instance of ICasSecurityContext.
*/
private ICasSecurityContext casSecurityContext;
public String getDescriptor(String descriptor,
final ChannelRuntimeData channelRuntimeData) {
if (log.isTraceEnabled()) {
log.trace("getDescriptor(" + descriptor + ", " + channelRuntimeData
+ ")");
}
descriptor = descriptor == null ? "null" : descriptor;
if (channelRuntimeData.getHttpRequestMethod().equals("GET")) {
if (this.casSecurityContext != null) {
final String proxyTicket = this.casSecurityContext
.getProxyTicket(new SimpleService(descriptor));
if (proxyTicket != null) {
// append ticket parameter and value to query string
if (descriptor.indexOf('?') != -1) {
descriptor = descriptor + "&ticket=" + proxyTicket;
} else {
descriptor = descriptor + "?ticket=" + proxyTicket;
}
}
}
}
return descriptor;
}
public void init(final ChannelStaticData channelStaticData) {
final ISecurityContext securityContext = channelStaticData.getPerson()
.getSecurityContext();
if (ICasSecurityContext.class.isAssignableFrom(securityContext
.getClass())
&& securityContext.isAuthenticated()) {
this.casSecurityContext = (ICasSecurityContext) securityContext;
}
final Enumeration enumeration = securityContext.getSubContexts();
while (enumeration.hasMoreElements()) {
final ISecurityContext context = (ISecurityContext) enumeration
.nextElement();
if (ISecurityContext.class.isAssignableFrom(context.getClass())
&& context.isAuthenticated()) {
this.casSecurityContext = (ICasSecurityContext) context;
}
}
if (this.casSecurityContext == null) {
log.warn("Unable to find authenticated ICasSecurityContext");
}
}
}

View File

@ -1,97 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.integration.uportal;
import org.jasig.cas.authentication.principal.Service;
import org.jasig.cas.client.util.CommonUtils;
import org.jasig.cas.client.validation.Assertion;
import org.jasig.cas.client.validation.TicketValidator;
import org.jasig.cas.client.validation.ValidationException;
import org.jasig.portal.security.PortalSecurityException;
import org.jasig.portal.security.provider.ChainingSecurityContext;
/**
* Implementation of ICasSecurityContext that knows how to handle CAS ticket
* validation, as well as the retrieval of Proxy Tickets.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public class CasSecurityContext extends ChainingSecurityContext implements
ICasSecurityContext {
/**
* Unique Id for Serialization
*/
private static final long serialVersionUID = 1L;
/**
* Instance of TicketValidator to validate tickets.
*/
private final TicketValidator ticketValidator;
/**
* Instance of Service representing uPortal instance.
*/
private final Service service;
/**
* Assertion about the person this security context is for.
*/
private Assertion assertion;
/**
* Instantiate a new CasSecurityContext, setting the required fields.
*
* @param ticketValidator the TicketValidator to validate tickets.
* @param service the Service representing the portal.
*/
public CasSecurityContext(final TicketValidator ticketValidator, final Service service) {
CommonUtils.assertNotNull(ticketValidator, "ticketValidator cannot be null.");
CommonUtils.assertNotNull(service, "service cannot be null.");
log.trace("Initalizing CasSecurityContext");
this.ticketValidator = ticketValidator;
this.service = service;
}
public final String getProxyTicket(final Service targetService) {
return this.assertion.getProxyTicketFor(targetService);
}
public final int getAuthType() {
return ICasSecurityContext.CAS_AUTHTYPE;
}
public final synchronized void authenticate() throws PortalSecurityException {
this.isauth = false;
final String serviceTicket = new String(
this.myOpaqueCredentials.credentialstring);
final Service service = getService();
if (log.isDebugEnabled()) {
log.debug("Attempting to validate ticket [" + serviceTicket
+ "] for service [" + service.toString());
}
try {
this.assertion = this.ticketValidator.validate(serviceTicket,
service);
this.myAdditionalDescriptor = null;
this.myPrincipal.setUID(this.assertion.getPrincipal().getId());
this.isauth = true;
super.authenticate();
} catch (final ValidationException e) {
log.warn(e, e);
throw new PortalSecurityException(e.getMessage(), e);
}
}
protected Service getService() {
return this.service;
}
}

View File

@ -1,36 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.integration.uportal;
import org.jasig.portal.security.ISecurityContext;
import org.jasig.portal.security.ISecurityContextFactory;
/**
* Implementation of an {@link ISecurityContextFactory} that on creation will
* retrieve references to Spring managed CAS client objects and pass them to all
* new CasSecurityContexts that are created.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class CasSecurityContextFactory extends AbstractCasSecurityContextFactory {
public CasSecurityContextFactory() {
super();
}
/**
* Instantiate a new instance of CasSecurityContext.
*
* @return a new ISecurityContext instance, specifically an instance of CasSecurityContext.
*/
public ISecurityContext getSecurityContext() {
log
.trace("Returning CasSecurityContext from CasSecurityContextFactory.");
return new CasSecurityContext(this.ticketValidator, this.service);
}
}

View File

@ -1,33 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.integration.uportal;
import org.jasig.cas.authentication.principal.Service;
/**
* Interface implemented by CAS security contexts. These implementations are
* aware of proxying, and can retrieve a ticket from CAS for accessing a
* specific service.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public interface ICasSecurityContext {
/**
* Authentication type for CAS authentication
*/
public static final int CAS_AUTHTYPE = 0x1701;
/**
* Retrieve a Proxy Ticket Id for a particular service we wish to proxy against.
*
* @param service the service to retrieve a proxy ticket for.
* @return the ticket id, or null if no ticket could be retrieved.
*/
String getProxyTicket(Service service);
}

View File

@ -1,38 +0,0 @@
package org.jasig.cas.client.integration.uportal;
import org.jasig.cas.authentication.principal.Service;
import org.jasig.cas.client.util.CommonUtils;
/**
* ThreadLocal container that exposes the service to lower layers in the authentication stack. Because of the ISecurityCcontext
* API this service url is not normally available.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class ServiceHolder {
private static final ThreadLocal threadLocal = new ThreadLocal();
public static void setService(final Service service) {
CommonUtils.assertNotNull(service, "service cannot be null.");
threadLocal.set(service);
}
/**
* Method to retrieve the service from the ThreadLocal
*
* @return the service. Should not ever be null.
*/
public static Service getService() {
return (Service) threadLocal.get();
}
/**
* Reset the context to clear it out.
*/
public static void clearContext() {
threadLocal.set(null);
}
}

View File

@ -1,43 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.integration.uportal;
import org.jasig.cas.authentication.principal.Service;
import org.jasig.cas.client.validation.TicketValidator;
/**
* Extension of AbstractCasSecurityContext that retrieves the Service from the
* ServiceHolder ThreadLocal object. This allows for a more flexible service to
* be provided for ticket validation. This is needed as the normal
* ISecurityContext has no mechanism for service urls based on requests.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class ThreadLocalAwareCasSecurityContext extends
CasSecurityContext {
/**
* Unique Id for Serialization.
*/
private static final long serialVersionUID = 1L;
/**
* Instantiate a new CasSecurityContext, setting the required fields.
*
* @param ticketValidator the Ticket Validator.
* @param service the Service instance representing this uPortal instance.
*/
public ThreadLocalAwareCasSecurityContext(
final TicketValidator ticketValidator, final Service service) {
super(ticketValidator, service);
}
protected Service getService() {
return ServiceHolder.getService();
}
}

View File

@ -1,24 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.integration.uportal;
import org.jasig.portal.security.ISecurityContext;
/**
* Factory to instantiate ThreadLocalAwareCasSecurityContexts.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class ThreadLocalAwareCasSecurityContextFactory extends
AbstractCasSecurityContextFactory {
public ISecurityContext getSecurityContext() {
return new ThreadLocalAwareCasSecurityContext(this.ticketValidator,
this.service);
}
}

View File

@ -1,55 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.integration.uportal;
import org.jasig.cas.authentication.principal.Service;
import org.jasig.cas.authentication.principal.SimpleService;
import org.jasig.cas.client.util.CommonUtils;
import org.jasig.cas.client.web.filter.AbstractCasFilter;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* Filter to construct the service url from the request and place it in a
* ThreadLocal so its available to the
* {@link ThreadLocalAwareCasSecurityContext} in order to use it for Ticket
* validation.
* <p>This filter places the Service in a {@link ServiceHolder}.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class ThreadLocalAwareCasServiceFilter extends AbstractCasFilter {
public ThreadLocalAwareCasServiceFilter(final String service, final boolean isServerName) {
super(service, isServerName);
}
protected void doFilterInternal(final HttpServletRequest request,
final HttpServletResponse response, final FilterChain filterChain)
throws IOException, ServletException {
final boolean hasTicket = CommonUtils.isNotBlank(request
.getParameter(getArgumentExtractor().getArtifactParameterName()));
try {
if (hasTicket) {
final Service service = new SimpleService(constructServiceUrl(
request, response));
ServiceHolder.setService(service);
}
filterChain.doFilter(request, response);
} finally {
if (hasTicket) {
ServiceHolder.clearContext();
}
}
}
}

View File

@ -1,40 +0,0 @@
/*
* Copyright 2006 The JA-SIG Collaborative. All rights reserved. See license
* distributed with this file and available online at
* http://www.ja-sig.org/products/cas/overview/license/index.html
*/
package org.jasig.cas.client.integration.uportal;
import org.jasig.cas.client.proxy.AbstractProxyReceptorServlet;
import org.jasig.cas.client.proxy.ProxyGrantingTicketStorage;
import org.jasig.portal.spring.PortalApplicationContextFacade;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
/**
* Implementation of AbstractProxyReceptorServlet that retrieves the
* ProxyGrantingTicket storage from the Portal Application Context instead of a
* WebApplicationContext.
*
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class UPortalConfiguredProxyReceptorServlet extends
AbstractProxyReceptorServlet {
/**
* Unique Id for Serialization.
*/
private static final long serialVersionUID = 6596608588362834646L;
protected ProxyGrantingTicketStorage retrieveProxyGrantingTicketStorageFromConfiguration(final ServletConfig servletConfig) throws ServletException {
logger.info("Retrieving ProxyGrantingTicketStorage from PortalApplicationContextFacade.");
return (ProxyGrantingTicketStorage) PortalApplicationContextFacade
.getPortalApplicationContext()
.getBean(
AbstractCasSecurityContextFactory.CONST_CAS_PROXY_GRANTING_TICKET_STORAGE);
}
}

View File

@ -1,66 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean
id="propertyPlaceholderConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property
name="location"
value="/WEB-INF/properties/cas-client.properties"/>
</bean>
<bean
id="casTicketValidator"
class="org.jasig.cas.client.validation.Cas20ServiceTicketValidator">
<constructor-arg index="0" value="${cas.server.url}"/>
<constructor-arg index="1" value="false"/>
<constructor-arg index="2" ref="httpClient"/>
<constructor-arg index="3">
<bean
class="org.jasig.cas.authentication.principal.SimpleService">
<constructor-arg value="${cas.server.proxyCallbackUrl}"/>
</bean>
</constructor-arg>
<constructor-arg index="4" ref="casProxyGrantingTicketStorage"/>
</bean>
<bean
id="casProxyGrantingTicketStorage"
class="org.jasig.cas.client.proxy.ProxyGrantingTicketStorageImpl"/>
<bean
id="casProxyReceiver"
class="org.jasig.cas.client.proxy.Cas20ProxyRetriever">
<constructor-arg value="${cas.server.url}"/>
<constructor-arg ref="httpClient"/>
</bean>
<bean
id="httpClient"
class="org.jasig.cas.util.HttpClient3FactoryBean">
<property
name="soTimeout"
value="5000"/>
<property
name="connectionTimeout"
value="5000"/>
<property
name="connectionManagerTimeout"
value="5000"/>
<property
name="defaultMaxConnectionsPerHost"
value="10"/>
<property
name="maxTotalConnections"
value="10"/>
</bean>
<bean
id="casService"
class="org.jasig.cas.authentication.principal.SimpleService">
<constructor-arg value="https://localhost:8443/portal/Authentication"/>
</bean>
</beans>

View File

@ -1,166 +0,0 @@
Product: Clover
License: Open Source License, 0.x, 1.x
Issued: Sun Feb 13 2005 22:45:43 CST
Expiry: Never
Key: aae4c7035b1208e316fa6d684
Name: Scott Battaglia
Org: JA-SIG Central Authentication Service
Certificate: AAACCG+Ow8B7/zEbxOMqqKwwrdpP+a1COmJGHco7sCNLjHkHnajPF+dQW
Ct12PMy0uml0s9xuus5wKngJ9OFk5PFeh01dzQF66bhXH1bvegLfvja3Kle6BYtDv4LZgE
gk3E0aJN4IbgTn+TgUckSevXDR4KzK77NWJfrVzkxV3/JepYRA9UAbsXHiki9WjMIJfzoZ
unjvtTFd/vTOcyirgfT/dTPrG9PAGAjH+e37E9Xf7HnRSrmxtrGX+wdaBOlZFUIIcVHKT2
IaGToLZnx7FvfE3rzyQCYtS+r0E+H61c+dANzySy5PEH2JEyL8M9JrwgYJSju1FWhxbXO2
Gb7y3Diufo80+HWz6xrGzl9IlXRseoXHki8rllk5taXqVv5G3UIsTFzbjjWUDlykn557C2
D4o9T0xQ/6dVFxak75o0MxP4aXGFMZNg/pCBH9DAU7/CKVKRBPAVx1PJ8vIy41MF4p9Mi1
qmELNvjn9K9fwpaeiUG9qT8B0pfq/tTAObG2sZf7B1mFbA3YwEqjhNqLdkoca5swrS0DI1
9OejIVIqjK+bvUZaqUDMxVX7fM6hwRvI9Wd+rwFG+X3wHYNPsZ+Cos8/BNPzIIoOh4SbTr
8vIqWUdPXM4HO26uAAVRKz6FknmwM/GQ7FyJBWgIXgXK51SLn+NcifxO8uywGewHzP00ki
frTPmy0+GrikleWry6BdWkg76hjrjQBalNlSmasi9yp9J8qdzVYvQlOBjS5EKWsvsSpXGY
MIdupkiv4a25aXsgdpGBy4GzcSUDioChq287HBBmYRIMVvp5OYbV3/+ERNhTlCQqb6Ck4g
891l1OJOEoMiDqcbDL8DNftlH4gybEE7zJXQRmmJKyw==
License Agreement: CLOVER VERSION 1 (ONE) SOFTWARE LICENSE AGREEMENT
1. Licenses and Software
Cortex eBusiness Pty Ltd, an Australian Proprietary Limited Company
("CENQUA") hereby grants to the purchaser (the "LICENSEE") a limited,
revocable, worldwide, non-exclusive, non-transferable,
non-sublicensable license to use the Clover version 1 (one) software
(the "Software"), including any minor upgrades thereof during the Term
(hereinafter defined) up to, but not including the next major version
of the Software. The licensee shall not, or knowingly allow others to,
reverse engineer, decompile, disassemble, modify, adapt, create
derivative works from or otherwise attempt to derive source code from
the Software provided. And, in accordance with the terms and
conditions of this Software License Agreement (the "Agreement"), the
Software shall be used solely by the licensed users in accordance with
the following edition specific conditions:
a) Server Edition
A Server Edition license entitles the Licensee to execute one instance
of Clover Server Edition on one (1) machine for the purposes of
instrumenting source code and generating reports. There are no
limitations on the use of the instrumented source code or generated
reports produced by Server Edition.
b) Workstation Edition
A Workstation Edition license entitles the licensee to use Clover
Workstation Edition on one (1) machine by one (1) individual end
user. Workstation Edition does not permit the generation of reports
for distribution.
c) Team Edition
A Team Edition license entitles the licensee to use Clover Team
edition on any number of machines solely by the licensed number of
users. Reports generated by Clover Team Edition are strictly for use
only by the licensed number of individual end users.
2. License Fee
In exchange for the License(s), the Licensee shall pay to Cenqua a
one-time, up front, non-refundable license fee. At the sole discretion
of Cenqua this fee will be waived for non-commercial
projects. Notwithstanding the Licensee's payment of the License Fee,
Cenqua reserves the right to terminate the License if Cenqua discovers
that the Licensee and/or the Licensee's use of the Software is in
breach of this Agreement.
3. Proprietary Rights
Cenqua will retain all right, title and interest in and to the
Software, all copies thereof, and Cenqua website(s), software, and
other intellectual property, including, but not limited to, ownership
of all copyrights, look and feel, trademark rights, design rights,
trade secret rights and any and all other intellectual property and
other proprietary rights therein. The Licensee will not directly or
indirectly obtain or attempt to obtain at any time, any right, title
or interest by registration or otherwise in or to the trademarks,
service marks, copyrights, trade names, symbols, logos or designations
or other intellectual property rights owned or used by Cenqua. All
technical manuals or other information provided by Cenqua to the
Licensee shall be the sole property of Cenqua.
4. Term and Termination
Subject to the other provisions hereof, this Agreement shall commence
upon the Licensee's opting into this Agreement and continue until the
Licensee discontinues use of the Software or the Agreement terminates
automatically upon the Licensee's breach of any term or condition of
this Agreement (the "Term"). Upon any such termination, the Licensee
will delete the Software immediately.
5. Copying & Transfer
The Licensee may copy the Software for back-up purposes only. The
Licensee may not assign or otherwise transfer the Software to any
third party.
6. Specific Disclaimer of Warranty and Limitation of Liability
THE SOFTWARE IS PROVIDED WITHOUT WARRANTY OF ANY KIND. CENQUA
DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE. CENQUA WILL NOT BE LIABLE FOR ANY DAMAGES
ASSOCIATED WITH THE SOFTWARE, INCLUDING, WITHOUT LIMITATION, ORDINARY,
INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES OF ANY KIND, INCLUDING
BUT NOT LIMITED TO DAMAGES RELATING TO LOST DATA OR LOST PROFITS, EVEN
IF CENQUA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. Warranties and Representations
Licensee Indemnification. CENQUA agrees to indemnify, defend and hold
the Licensee harmless from and against any and all liabilities,
damages, losses, claims, costs, and expenses (including reasonable
legal fees) arising out of or resulting from the Software or the use
thereof infringing upon, misappropriating or violating any patents,
copyrights, trademarks, or trade secret rights or other proprietary
rights of persons, firms or entities who are not parties to this
Agreement.
CENQUA Indemnification. The Licensee warrants and represents that the
Licensee's actions with regard to the Software will be in compliance
with all applicable laws; and the Licensee agrees to indemnify,
defend, and hold CENQUA harmless from and against any and all
liabilities, damages, losses, claims, costs, and expenses (including
reasonable legal fees) arising out of or resulting from the
Licensee's failure to observe the use restrictions set forth herein.
8. Publicity
The Licensee grants permission for CENQUA to use Licensee's name
solely in customer lists. CENQUA shall not, without prior consent in
writing, use the Licensee's name, or that of its affiliates, in any
form with the specific exception of customer lists. CENQUA agrees to
remove Licensee's name from any and all materials within 7 days if
notified by the Licensee in writing.
9. Governing Law
This Agreement shall be governed by the laws of New South Wales,
Australia.
10. Independent Contractors
The parties are independent contractors with respect to each other,
and nothing in this Agreement shall be construed as creating an
employer-employee relationship, a partnership, agency relationship or
a joint venture between the parties.
11. Assignment
This Agreement is not assignable or transferable by the Licensee.
CENQUA in its sole discretion may transfer a license to a third party
at the written request of the Licensee.
12. Entire Agreement
This Agreement constitutes the entire agreement between the parties
concerning the Licensee's use of the Software. This Agreement
supersedes any prior verbal understanding between the parties and any
Licensee purchase order or other ordering document, regardless of
whether such document is received by CENQUA before or after execution
of this Agreement. This Agreement may be amended only in writing by
CENQUA.

View File

@ -1,24 +0,0 @@
package org.jasig.cas.client.integration.uportal;
import junit.framework.TestCase;
import org.jasig.portal.security.ISecurityContext;
/**
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class CasSecurityContextFactoryTests extends TestCase {
private CasSecurityContextFactory casSecurityContextFactory;
protected void setUp() throws Exception {
this.casSecurityContextFactory = new CasSecurityContextFactory();
}
public void testGetter() {
final ISecurityContext casSecurityContext = this.casSecurityContextFactory.getSecurityContext();
assertNotNull(casSecurityContext);
}
}

View File

@ -1,82 +0,0 @@
package org.jasig.cas.client.integration.uportal;
import junit.framework.TestCase;
import org.jasig.cas.authentication.principal.Service;
import org.jasig.cas.authentication.principal.SimplePrincipal;
import org.jasig.cas.authentication.principal.SimpleService;
import org.jasig.cas.client.proxy.ProxyRetriever;
import org.jasig.cas.client.validation.Assertion;
import org.jasig.cas.client.validation.AssertionImpl;
import org.jasig.cas.client.validation.TicketValidator;
import org.jasig.cas.client.validation.ValidationException;
import org.jasig.portal.security.PortalSecurityException;
import java.util.HashMap;
/**
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class CasSecurityContextTests extends TestCase {
private CasSecurityContext context;
protected void setUp() throws Exception {
this.context = new CasSecurityContext(new TicketValidator() {
public Assertion validate(String ticketId, Service service) throws ValidationException {
return new AssertionImpl(new SimplePrincipal("test"), new HashMap());
}
}, new SimpleService("test"));
this.context.getOpaqueCredentialsInstance().setCredentials("ticket");
}
public void testAuthenticate() throws Exception {
this.context.authenticate();
assertEquals("test", this.context.getPrincipal().getUID());
assertTrue(this.context.isAuthenticated());
assertNull(this.context.getProxyTicket(new SimpleService("test")));
}
public void testAuthenticateWithProxy() throws Exception {
this.context = new CasSecurityContext(new TicketValidator() {
public Assertion validate(String ticketId, Service service) throws ValidationException {
return new AssertionImpl(new SimplePrincipal("test"), new HashMap(), new ProxyRetriever() {
public String getProxyTicketIdFor(String proxyGrantingTicketId, Service targetService) {
return "test";
}
}, "proxyTicketId");
}
}, new SimpleService("test"));
this.context.getOpaqueCredentialsInstance().setCredentials("ticket");
this.context.authenticate();
assertEquals("test", this.context.getProxyTicket(new SimpleService("test")));
}
public void testAuthenticateFail() {
this.context = new CasSecurityContext(new TicketValidator() {
public Assertion validate(String ticketId, Service service) throws ValidationException {
throw new ValidationException("test");
}
}, new SimpleService("test"));
this.context.getOpaqueCredentialsInstance().setCredentials("ticket");
try {
this.context.authenticate();
fail("Exception expected.");
} catch (PortalSecurityException e) {
assertTrue(e.getCause() instanceof ValidationException);
}
}
public void testGetAuthType() {
assertEquals(ICasSecurityContext.CAS_AUTHTYPE, this.context.getAuthType());
}
}

View File

@ -1,31 +0,0 @@
package org.jasig.cas.client.integration.uportal;
import junit.framework.TestCase;
import org.jasig.cas.authentication.principal.Service;
import org.jasig.cas.authentication.principal.SimpleService;
/**
* @author Scott Battaglia
* @version $Revision$ $Datet$
* @since 3.0
*/
public final class ServiceHolderTests extends TestCase {
public void testSetGetService() {
final Service service = new SimpleService("test");
ServiceHolder.setService(service);
assertEquals(service, ServiceHolder.getService());
}
public void testClearContext() {
final Service service = new SimpleService("test");
ServiceHolder.setService(service);
assertEquals(service, ServiceHolder.getService());
ServiceHolder.clearContext();
assertNull(ServiceHolder.getService());
}
}

View File

@ -1,25 +0,0 @@
package org.jasig.cas.client.integration.uportal;
import junit.framework.TestCase;
import org.jasig.portal.security.ISecurityContext;
/**
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class ThreadLocalAwareCasSecurityContextFactoryTests extends TestCase {
private ThreadLocalAwareCasSecurityContextFactory factory;
protected void setUp() throws Exception {
this.factory = new ThreadLocalAwareCasSecurityContextFactory();
}
public void testGetter() {
ISecurityContext context = this.factory.getSecurityContext();
assertNotNull(context);
assertTrue(context instanceof ThreadLocalAwareCasSecurityContext);
}
}

View File

@ -1,28 +0,0 @@
package org.jasig.cas.client.integration.uportal;
import junit.framework.TestCase;
import org.jasig.cas.authentication.principal.Service;
import org.jasig.cas.authentication.principal.SimpleService;
/**
* @author Scott
*/
public final class ThreadLocalAwareCasSecurityContextTests extends TestCase {
private ThreadLocalAwareCasSecurityContext context;
protected void setUp() throws Exception {
final ThreadLocalAwareCasSecurityContextFactory factory = new ThreadLocalAwareCasSecurityContextFactory();
this.context = (ThreadLocalAwareCasSecurityContext) factory.getSecurityContext();
}
public void testGetService() {
final Service service = new SimpleService("test");
ServiceHolder.setService(service);
assertEquals(service, this.context.getService());
ServiceHolder.clearContext();
}
}

View File

@ -1,51 +0,0 @@
package org.jasig.cas.client.integration.uportal;
import junit.framework.TestCase;
import org.jasig.cas.authentication.principal.SimpleService;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import java.io.IOException;
/**
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class ThreadLocalAwareCasServiceFilterTests extends TestCase {
private ThreadLocalAwareCasServiceFilter filter;
protected void setUp() throws Exception {
this.filter = new ThreadLocalAwareCasServiceFilter("http://localhost", false);
}
public void testServiceSetter() throws IOException, ServletException {
final MockHttpServletRequest request = new MockHttpServletRequest();
request.setParameter("ticket", "test");
this.filter.doFilter(request, new MockHttpServletResponse(), new FilterChain() {
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse) throws IOException, ServletException {
assertNotNull(ServiceHolder.getService());
assertEquals(new SimpleService("http://localhost"), ServiceHolder.getService());
}
});
}
public void testNoServiceSetter() throws IOException, ServletException {
final MockHttpServletRequest request = new MockHttpServletRequest();
this.filter.doFilter(request, new MockHttpServletResponse(), new FilterChain() {
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse) throws IOException, ServletException {
assertNull(ServiceHolder.getService());
}
});
}
}

View File

@ -1,18 +0,0 @@
package org.jasig.cas.client.integration.uportal;
import junit.framework.TestCase;
import org.springframework.mock.web.MockServletConfig;
import org.springframework.mock.web.MockServletContext;
/**
* @author Scott Battaglia
* @version $Revision$ $Date$
* @since 3.0
*/
public final class UPortalConfiguredProxyReceptorServletTests extends TestCase {
public void testInitialization() throws Exception {
final UPortalConfiguredProxyReceptorServlet servlet = new UPortalConfiguredProxyReceptorServlet();
servlet.init(new MockServletConfig(new MockServletContext()));
}
}

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="org.jasig.portal" lazy-init="true"
class="org.springframework.context.support.ClassPathXmlApplicationContext">
<constructor-arg>
<list>
<value>properties/uPortalConfigContext.xml</value>
</list>
</constructor-arg>
</bean>
</beans>

View File

@ -1,59 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean
id="casTicketValidator"
class="org.jasig.cas.client.validation.Cas20ServiceTicketValidator">
<constructor-arg index="0" value="https://localhost:8443/cas/"/>
<constructor-arg index="1" value="false"/>
<constructor-arg index="2" ref="httpClient"/>
<constructor-arg index="3">
<bean
class="org.jasig.cas.authentication.principal.SimpleService">
<constructor-arg value="https://localhost:8443/portal/Proxy"/>
</bean>
</constructor-arg>
<constructor-arg index="4" ref="casProxyGrantingTicketStorage"/>
<constructor-arg index="5" ref="casProxyRetriever"/>
</bean>
<bean
id="casProxyGrantingTicketStorage"
class="org.jasig.cas.client.proxy.ProxyGrantingTicketStorageImpl"/>
<bean
id="casProxyRetriever"
class="org.jasig.cas.client.proxy.Cas20ProxyRetriever">
<constructor-arg value="https://localhost:8443/cas/"/>
<constructor-arg ref="httpClient"/>
</bean>
<bean
id="httpClient"
class="org.jasig.cas.util.HttpClient3FactoryBean">
<property
name="soTimeout"
value="5000"/>
<property
name="connectionTimeout"
value="5000"/>
<property
name="connectionManagerTimeout"
value="5000"/>
<property
name="defaultMaxConnectionsPerHost"
value="10"/>
<property
name="maxTotalConnections"
value="10"/>
</bean>
<bean
id="casService"
class="org.jasig.cas.authentication.principal.SimpleService">
<constructor-arg value="https://localhost:8443/portal/Authentication"/>
</bean>
</beans>

View File

@ -1,71 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4" relativePaths="false" type="JAVA_MODULE">
<component name="ModuleRootManager" />
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/target/classes" />
<exclude-output />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/target/classes" />
<excludeFolder url="file://$MODULE_DIR$/target/test-classes" />
</content>
<orderEntry type="jdk" jdkName="1.6" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/org/springframework/spring-beans/2.0.2/spring-beans-2.0.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/commons-logging/commons-logging/1.1/commons-logging-1.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/org/springframework/spring-core/2.0.2/spring-core-2.0.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar:///home/battags/.m2/repository/org/jasig/cas/cas-server-core/3.1-m1/cas-server-core-3.1-m1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntryProperties />
</component>
</module>

View File

@ -1,411 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4" relativePaths="false">
<component name="AntConfiguration">
<defaultAnt bundledAnt="true" />
</component>
<component name="BuildJarProjectSettings">
<option name="BUILD_JARS_ON_MAKE" value="false" />
</component>
<component name="CodeStyleManager">
<option name="USE_DEFAULT_CODE_STYLE_SCHEME" value="true" />
<option name="CODE_STYLE_SCHEME" value="" />
</component>
<component name="CodeStyleProjectProfileManger">
<option name="PROJECT_PROFILE" />
<option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
</component>
<component name="CodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS" />
<option name="USE_PER_PROJECT_SETTINGS" value="false" />
</component>
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<option name="DEPLOY_AFTER_MAKE" value="0" />
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
</wildcardResourcePatterns>
</component>
<component name="DataSourceManager" />
<component name="DataSourceManagerImpl" />
<component name="DependenciesAnalyzeManager">
<option name="myForwardDirection" value="false" />
</component>
<component name="DependencyValidationManager" />
<component name="EclipseCompilerSettings">
<option name="DEBUGGING_INFO" value="true" />
<option name="GENERATE_NO_WARNINGS" value="true" />
<option name="DEPRECATION" value="false" />
<option name="ADDITIONAL_OPTIONS_STRING" value="" />
<option name="MAXIMUM_HEAP_SIZE" value="128" />
</component>
<component name="EclipseEmbeddedCompilerSettings">
<option name="DEBUGGING_INFO" value="true" />
<option name="GENERATE_NO_WARNINGS" value="true" />
<option name="DEPRECATION" value="false" />
<option name="ADDITIONAL_OPTIONS_STRING" value="" />
<option name="MAXIMUM_HEAP_SIZE" value="128" />
</component>
<component name="EntryPointsManager">
<entry_points />
</component>
<component name="ExportToHTMLSettings">
<option name="PRINT_LINE_NUMBERS" value="false" />
<option name="OPEN_IN_BROWSER" value="false" />
<option name="OUTPUT_DIRECTORY" />
</component>
<component name="GUI Designer component loader factory" />
<component name="IdProvider" IDEtalkID="A88B919D1EB5C876310AA75F12222006" />
<component name="ImportConfiguration">
<option name="VENDOR" />
<option name="RELEASE_TAG" />
<option name="LOG_MESSAGE" />
<option name="CHECKOUT_AFTER_IMPORT" value="true" />
</component>
<component name="InspectionProjectProfileManager">
<option name="PROJECT_PROFILE" value="Project Default" />
<option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
<scopes />
<profiles>
<profile version="1.0" is_locked="false">
<option name="myName" value="Project Default" />
<option name="myLocal" value="false" />
<used_levels>
<error>
<option name="myName" value="ERROR" />
<option name="myVal" value="200" />
</error>
<warning>
<option name="myName" value="WARNING" />
<option name="myVal" value="100" />
</warning>
<information>
<option name="myName" value="INFO" />
<option name="myVal" value="200" />
</information>
<server>
<option name="myName" value="SERVER PROBLEM" />
<option name="myVal" value="100" />
</server>
</used_levels>
<inspection_tool class="SamePackageImport" level="WARNING" enabled="true" />
<inspection_tool class="JavaLangImport" level="WARNING" enabled="true" />
<inspection_tool class="RedundantImport" level="WARNING" enabled="true" />
<inspection_tool class="UnusedImport" level="WARNING" enabled="true" />
<inspection_tool class="AbstractMethodCallInConstructor" level="WARNING" enabled="true" />
<inspection_tool class="InstanceVariableInitialization" level="WARNING" enabled="true">
<option name="m_ignorePrimitives" value="false" />
</inspection_tool>
<inspection_tool class="InstanceVariableUninitializedUse" level="WARNING" enabled="true">
<option name="m_ignorePrimitives" value="false" />
</inspection_tool>
<inspection_tool class="NonFinalStaticVariableUsedInClassInitialization" level="WARNING" enabled="true" />
<inspection_tool class="OverriddenMethodCallInConstructor" level="WARNING" enabled="true" />
<inspection_tool class="StaticVariableInitialization" level="WARNING" enabled="true">
<option name="m_ignorePrimitives" value="false" />
</inspection_tool>
<inspection_tool class="StaticVariableUninitializedUse" level="WARNING" enabled="true">
<option name="m_ignorePrimitives" value="false" />
</inspection_tool>
<inspection_tool class="ThisEscapedInConstructor" level="WARNING" enabled="true" />
<inspection_tool class="NonThreadSafeLazyInitialization" level="WARNING" enabled="true" />
<inspection_tool class="ForCanBeForeach" level="WARNING" enabled="false" />
<inspection_tool class="UnnecessaryBoxing" level="WARNING" enabled="false" />
<inspection_tool class="UnnecessaryUnboxing" level="WARNING" enabled="false" />
<inspection_tool class="WhileCanBeForeach" level="WARNING" enabled="false" />
<inspection_tool class="ClassWithMultipleLoggers" level="WARNING" enabled="true">
<option name="loggerClassName" value="java.util.logging.Logger" />
</inspection_tool>
<inspection_tool class="ClassWithoutLogger" level="WARNING" enabled="true">
<option name="loggerClassName" value="org.apache.commons.logging.Log" />
<option name="ignoreSuperLoggers" value="true" />
</inspection_tool>
<inspection_tool class="SystemGC" level="WARNING" enabled="true" />
<inspection_tool class="Weblogic" level="ERROR" enabled="false" />
<inspection_tool class="ClassEscapesItsScope" level="WARNING" enabled="true" />
<inspection_tool class="FieldHidesSuperclassField" level="WARNING" enabled="true">
<option name="m_ignoreInvisibleFields" value="true" />
</inspection_tool>
<inspection_tool class="InnerClassVariableHidesOuterClassVariable" level="WARNING" enabled="true">
<option name="m_ignoreInvisibleFields" value="true" />
</inspection_tool>
<inspection_tool class="LocalVariableHidingMemberVariable" level="WARNING" enabled="true">
<option name="m_ignoreInvisibleFields" value="true" />
<option name="m_ignoreStaticMethods" value="true" />
</inspection_tool>
<inspection_tool class="MethodOverloadsParentMethod" level="WARNING" enabled="true" />
<inspection_tool class="MethodOverridesPackageLocalMethod" level="WARNING" enabled="true" />
<inspection_tool class="MethodOverridesPrivateMethod" level="WARNING" enabled="true" />
<inspection_tool class="MethodOverridesStaticMethod" level="WARNING" enabled="true" />
<inspection_tool class="TypeParameterHidesVisibleType" level="WARNING" enabled="true" />
<inspection_tool class="BoundFieldAssignment" level="WARNING" enabled="false" />
<inspection_tool class="OneButtonGroup" level="WARNING" enabled="false" />
<inspection_tool class="DuplicateMnemonic" level="WARNING" enabled="false" />
<inspection_tool class="MissingMnemonic" level="WARNING" enabled="false" />
<inspection_tool class="NoLabelFor" level="WARNING" enabled="false" />
<inspection_tool class="NoButtonGroup" level="WARNING" enabled="false" />
<inspection_tool class="NoScrollPane" level="WARNING" enabled="false" />
<inspection_tool class="StrutsInspection" level="ERROR" enabled="false" />
<inspection_tool class="StrutsTilesInspection" level="ERROR" enabled="false" />
<inspection_tool class="StrutsValidatorInspection" level="ERROR" enabled="false" />
<inspection_tool class="ReplaceAllDot" level="WARNING" enabled="true" />
<inspection_tool class="ComponentRegistrationProblems" level="ERROR" enabled="false">
<option name="CHECK_PLUGIN_XML" value="true" />
<option name="CHECK_JAVA_CODE" value="true" />
<option name="CHECK_ACTIONS" value="true" />
</inspection_tool>
<inspection_tool class="ComponentNotRegistered" level="WARNING" enabled="false">
<option name="CHECK_ACTIONS" value="true" />
<option name="IGNORE_NON_PUBLIC" value="true" />
</inspection_tool>
<inspection_tool class="CallToSimpleGetterInClass" level="WARNING" enabled="true">
<option name="ignoreGetterCallsOnOtherObjects" value="false" />
</inspection_tool>
<inspection_tool class="CallToSimpleSetterInClass" level="WARNING" enabled="true">
<option name="ignoreSetterCallsOnOtherObjects" value="false" />
</inspection_tool>
<inspection_tool class="ConstantStringIntern" level="WARNING" enabled="true" />
<inspection_tool class="CollectionsMustHaveInitialCapacity" level="WARNING" enabled="true" />
<inspection_tool class="TrivialStringConcatenation" level="WARNING" enabled="true" />
<inspection_tool class="StringBufferReplaceableByString" level="WARNING" enabled="true" />
<inspection_tool class="FieldMayBeStatic" level="WARNING" enabled="true" />
<inspection_tool class="StringReplaceableByStringBuffer" level="WARNING" enabled="true" />
<inspection_tool class="SizeReplaceableByIsEmpty" level="WARNING" enabled="true" />
<inspection_tool class="LengthOneStringInIndexOf" level="WARNING" enabled="true" />
<inspection_tool class="NonJREEmulationClassesInClientCode" level="ERROR" enabled="false" />
<inspection_tool class="GwtServiceNotRegistered" level="ERROR" enabled="false" />
<inspection_tool class="GWTRemoteServiceAsyncCheck" level="ERROR" enabled="false" />
<inspection_tool class="NonSerializableServiceParameters" level="ERROR" enabled="false" />
<inspection_tool class="GWTStyleCheck" level="ERROR" enabled="false" />
<inspection_tool class="GwtToHtmlReferences" level="ERROR" enabled="false" />
<inspection_tool class="FacesModelInspection" level="ERROR" enabled="false" />
<inspection_tool class="CastToConcreteClass" level="WARNING" enabled="true" />
<inspection_tool class="InstanceofChain" level="WARNING" enabled="true" />
<inspection_tool class="ClassReferencesSubclass" level="WARNING" enabled="true" />
<inspection_tool class="DeclareCollectionAsInterface" level="WARNING" enabled="true">
<option name="ignoreLocalVariables" value="false" />
<option name="ignorePrivateMethodsAndFields" value="false" />
</inspection_tool>
<inspection_tool class="FeatureEnvy" level="WARNING" enabled="true" />
<inspection_tool class="InstanceVariableOfConcreteClass" level="WARNING" enabled="true" />
<inspection_tool class="InstanceofInterfaces" level="WARNING" enabled="true" />
<inspection_tool class="InstanceofThis" level="WARNING" enabled="true" />
<inspection_tool class="LocalVariableOfConcreteClass" level="WARNING" enabled="true" />
<inspection_tool class="MagicNumber" level="WARNING" enabled="true">
<option name="m_ignoreInHashCode" value="true" />
</inspection_tool>
<inspection_tool class="ParameterOfConcreteClass" level="WARNING" enabled="true" />
<inspection_tool class="OverlyStrongTypeCast" level="WARNING" enabled="true" />
<inspection_tool class="MethodOnlyUsedFromInnerClass" level="WARNING" enabled="true">
<option name="ignoreMethodsAccessedFromAnonymousClass" value="false" />
</inspection_tool>
<inspection_tool class="PublicMethodNotExposedInInterface" level="WARNING" enabled="true" />
<inspection_tool class="StaticMethodOnlyUsedInOneClass" level="WARNING" enabled="true" />
<inspection_tool class="StaticVariableOfConcreteClass" level="WARNING" enabled="true" />
<inspection_tool class="ParameterHidingMemberVariable" level="WARNING" enabled="true">
<option name="m_ignoreInvisibleFields" value="true" />
<option name="m_ignoreStaticMethodParametersHidingInstanceFields" value="false" />
<option name="m_ignoreForConstructors" value="true" />
<option name="m_ignoreForPropertySetters" value="true" />
<option name="m_ignoreForAbstractMethods" value="false" />
</inspection_tool>
<inspection_tool class="MethodReturnOfConcreteClass" level="WARNING" enabled="true" />
</profile>
</profiles>
</component>
<component name="JUnitProjectSettings">
<option name="TEST_RUNNER" value="UI" />
</component>
<component name="JavacSettings">
<option name="DEBUGGING_INFO" value="true" />
<option name="GENERATE_NO_WARNINGS" value="false" />
<option name="DEPRECATION" value="true" />
<option name="ADDITIONAL_OPTIONS_STRING" value="" />
<option name="MAXIMUM_HEAP_SIZE" value="128" />
</component>
<component name="JavadocGenerationManager">
<option name="OUTPUT_DIRECTORY" />
<option name="OPTION_SCOPE" value="protected" />
<option name="OPTION_HIERARCHY" value="false" />
<option name="OPTION_NAVIGATOR" value="false" />
<option name="OPTION_INDEX" value="false" />
<option name="OPTION_SEPARATE_INDEX" value="false" />
<option name="OPTION_DOCUMENT_TAG_USE" value="false" />
<option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
<option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
<option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="false" />
<option name="OPTION_DEPRECATED_LIST" value="false" />
<option name="OTHER_OPTIONS" />
<option name="HEAP_SIZE" />
<option name="LOCALE" />
<option name="OPEN_IN_BROWSER" value="false" />
</component>
<component name="JikesSettings">
<option name="JIKES_PATH" value="" />
<option name="DEBUGGING_INFO" value="true" />
<option name="DEPRECATION" value="true" />
<option name="GENERATE_NO_WARNINGS" value="false" />
<option name="IS_EMACS_ERRORS_MODE" value="true" />
<option name="ADDITIONAL_OPTIONS_STRING" value="" />
</component>
<component name="LogConsolePreferences">
<option name="FILTER_ERRORS" value="false" />
<option name="FILTER_WARNINGS" value="false" />
<option name="FILTER_INFO" value="true" />
<option name="CUSTOM_FILTER" />
</component>
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/cas-client.iml" filepath="$PROJECT_DIR$/cas-client.iml" />
<module fileurl="file://$PROJECT_DIR$/cas-client-core/cas-client-core.iml" filepath="$PROJECT_DIR$/cas-client-core/cas-client-core.iml" />
<module fileurl="file://$PROJECT_DIR$/cas-client-uportal/cas-client-uportal.iml" filepath="$PROJECT_DIR$/cas-client-uportal/cas-client-uportal.iml" />
</modules>
</component>
<component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="1.5" />
<component name="ProjectRunConfigurationManager" />
<component name="RmicSettings">
<option name="IS_EANABLED" value="false" />
<option name="DEBUGGING_INFO" value="true" />
<option name="GENERATE_NO_WARNINGS" value="false" />
<option name="GENERATE_IIOP_STUBS" value="false" />
<option name="ADDITIONAL_OPTIONS_STRING" value="" />
</component>
<component name="StarteamVcsAdapter" />
<component name="VssVcs" />
<component name="com.intellij.jsf.UserDefinedFacesConfigs">
<option name="USER_DEFINED_CONFIGS">
<value>
<list size="0" />
</value>
</option>
</component>
<component name="libraryTable" />
<component name="uidesigner-configuration">
<option name="INSTRUMENT_CLASSES" value="true" />
<option name="COPY_FORMS_RUNTIME_TO_OUTPUT" value="true" />
<option name="DEFAULT_LAYOUT_MANAGER" value="GridLayoutManager" />
</component>
<UsedPathMacros />
</project>

View File

@ -1,786 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4" relativePaths="false">
<component name="AppServerRunManager" />
<component name="AspectsView" />
<component name="BookmarkManager" />
<component name="ChangeBrowserSettings">
<option name="MAIN_SPLITTER_PROPORTION" value="0.3" />
<option name="MESSAGES_SPLITTER_PROPORTION" value="0.8" />
<option name="USE_DATE_BEFORE_FILTER" value="false" />
<option name="USE_DATE_AFTER_FILTER" value="false" />
<option name="USE_CHANGE_BEFORE_FILTER" value="false" />
<option name="USE_CHANGE_AFTER_FILTER" value="false" />
<option name="DATE_BEFORE" value="" />
<option name="DATE_AFTER" value="" />
<option name="CHANGE_BEFORE" value="" />
<option name="CHANGE_AFTER" value="" />
<option name="USE_USER_FILTER" value="false" />
<option name="USER" value="" />
</component>
<component name="ChangeListManager">
<list default="true" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cas-client-uportal/cas-client-uportal.iml" afterPath="$PROJECT_DIR$/cas-client-uportal/cas-client-uportal.iml" />
<change type="DELETED" beforePath="$PROJECT_DIR$/cas-client-core/.project" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/cas-client-uportal/.settings/org.eclipse.jdt.core.prefs" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cas-client.iml" afterPath="$PROJECT_DIR$/cas-client.iml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cas-client.ipr" afterPath="$PROJECT_DIR$/cas-client.ipr" />
<change type="DELETED" beforePath="$PROJECT_DIR$/cas-client-core/.classpath" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/pom.xml" afterPath="$PROJECT_DIR$/pom.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cas-client-uportal/pom.xml" afterPath="$PROJECT_DIR$/cas-client-uportal/pom.xml" />
<change type="DELETED" beforePath="$PROJECT_DIR$/cas-client-core/.cvsignore" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cas-client-core/pom.xml" afterPath="$PROJECT_DIR$/cas-client-core/pom.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cas-client-core/cas-client-core.iml" afterPath="$PROJECT_DIR$/cas-client-core/cas-client-core.iml" />
<change type="DELETED" beforePath="$PROJECT_DIR$/build.bat" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/cas-client-core/.settings/org.eclipse.jdt.core.prefs" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cas-client.iws" afterPath="$PROJECT_DIR$/cas-client.iws" />
</list>
</component>
<component name="ChangeListSynchronizer" />
<component name="ChangesViewManager" flattened_view="false" />
<component name="CheckinPanelState" />
<component name="Commander">
<leftPanel />
<rightPanel />
<splitter proportion="0.5" />
</component>
<component name="CompilerWorkspaceConfiguration">
<option name="COMPILE_IN_BACKGROUND" value="false" />
<option name="AUTO_SHOW_ERRORS_IN_EDITOR" value="true" />
<option name="CLOSE_MESSAGE_VIEW_IF_SUCCESS" value="true" />
<option name="COMPILE_DEPENDENT_FILES" value="false" />
<option name="CLEAR_OUTPUT_DIRECTORY" value="false" />
<option name="ASSERT_NOT_NULL" value="true" />
</component>
<component name="CoverageDataManager" />
<component name="Cvs2Configuration">
<option name="PRUNE_EMPTY_DIRECTORIES" value="true" />
<option name="MERGING_MODE" value="0" />
<option name="MERGE_WITH_BRANCH1_NAME" value="HEAD" />
<option name="MERGE_WITH_BRANCH2_NAME" value="HEAD" />
<option name="RESET_STICKY" value="false" />
<option name="CREATE_NEW_DIRECTORIES" value="true" />
<option name="DEFAULT_TEXT_FILE_SUBSTITUTION" value="kv" />
<option name="PROCESS_UNKNOWN_FILES" value="false" />
<option name="PROCESS_DELETED_FILES" value="false" />
<option name="PROCESS_IGNORED_FILES" value="false" />
<option name="RESERVED_EDIT" value="false" />
<option name="CHECKOUT_DATE_OR_REVISION_SETTINGS">
<value>
<option name="BRANCH" value="" />
<option name="DATE" value="" />
<option name="USE_BRANCH" value="false" />
<option name="USE_DATE" value="false" />
</value>
</option>
<option name="UPDATE_DATE_OR_REVISION_SETTINGS">
<value>
<option name="BRANCH" value="" />
<option name="DATE" value="" />
<option name="USE_BRANCH" value="false" />
<option name="USE_DATE" value="false" />
</value>
</option>
<option name="SHOW_CHANGES_REVISION_SETTINGS">
<value>
<option name="BRANCH" value="" />
<option name="DATE" value="" />
<option name="USE_BRANCH" value="false" />
<option name="USE_DATE" value="false" />
</value>
</option>
<option name="SHOW_OUTPUT" value="false" />
<option name="ADD_WATCH_INDEX" value="0" />
<option name="REMOVE_WATCH_INDEX" value="0" />
<option name="UPDATE_KEYWORD_SUBSTITUTION" />
<option name="MAKE_NEW_FILES_READONLY" value="false" />
<option name="SHOW_CORRUPTED_PROJECT_FILES" value="0" />
<option name="TAG_AFTER_PROJECT_COMMIT" value="false" />
<option name="OVERRIDE_EXISTING_TAG_FOR_PROJECT" value="true" />
<option name="TAG_AFTER_PROJECT_COMMIT_NAME" value="" />
<option name="CLEAN_COPY" value="false" />
</component>
<component name="CvsTabbedWindow" />
<component name="DaemonCodeAnalyzer">
<disable_hints />
</component>
<component name="DebuggerManager">
<breakpoint_any>
<breakpoint>
<option name="NOTIFY_CAUGHT" value="true" />
<option name="NOTIFY_UNCAUGHT" value="true" />
<option name="ENABLED" value="false" />
<option name="SUSPEND_POLICY" value="SuspendAll" />
<option name="LOG_ENABLED" value="false" />
<option name="LOG_EXPRESSION_ENABLED" value="false" />
<option name="COUNT_FILTER_ENABLED" value="false" />
<option name="COUNT_FILTER" value="0" />
<option name="CONDITION_ENABLED" value="false" />
<option name="CLASS_FILTERS_ENABLED" value="false" />
<option name="INSTANCE_FILTERS_ENABLED" value="false" />
<option name="CONDITION" value="" />
<option name="LOG_MESSAGE" value="" />
</breakpoint>
<breakpoint>
<option name="NOTIFY_CAUGHT" value="true" />
<option name="NOTIFY_UNCAUGHT" value="true" />
<option name="ENABLED" value="false" />
<option name="SUSPEND_POLICY" value="SuspendAll" />
<option name="LOG_ENABLED" value="false" />
<option name="LOG_EXPRESSION_ENABLED" value="false" />
<option name="COUNT_FILTER_ENABLED" value="false" />
<option name="COUNT_FILTER" value="0" />
<option name="CONDITION_ENABLED" value="false" />
<option name="CLASS_FILTERS_ENABLED" value="false" />
<option name="INSTANCE_FILTERS_ENABLED" value="false" />
<option name="CONDITION" value="" />
<option name="LOG_MESSAGE" value="" />
</breakpoint>
</breakpoint_any>
<breakpoint_rules />
<ui_properties />
</component>
<component name="DebuggerSettings">
<option name="TRACING_FILTERS_ENABLED" value="true" />
<option name="TOSTRING_CLASSES_ENABLED" value="false" />
<option name="VALUE_LOOKUP_DELAY" value="700" />
<option name="DEBUGGER_TRANSPORT" value="0" />
<option name="FORCE_CLASSIC_VM" value="true" />
<option name="HIDE_DEBUGGER_ON_PROCESS_TERMINATION" value="false" />
<option name="SKIP_SYNTHETIC_METHODS" value="true" />
<option name="SKIP_CONSTRUCTORS" value="false" />
<option name="STEP_THREAD_SUSPEND_POLICY" value="SuspendThread" />
<default_breakpoint_settings>
<option name="NOTIFY_CAUGHT" value="true" />
<option name="NOTIFY_UNCAUGHT" value="true" />
<option name="WATCH_MODIFICATION" value="true" />
<option name="WATCH_ACCESS" value="true" />
<option name="WATCH_ENTRY" value="true" />
<option name="WATCH_EXIT" value="true" />
<option name="ENABLED" value="true" />
<option name="SUSPEND_VM" value="true" />
<option name="COUNT_FILTER_ENABLED" value="false" />
<option name="COUNT_FILTER" value="0" />
<option name="CONDITION_ENABLED" value="false" />
<option name="CONDITION" />
<option name="LOG_ENABLED" value="false" />
<option name="LOG_EXPRESSION_ENABLED" value="false" />
<option name="LOG_MESSAGE" />
<option name="CLASS_FILTERS_ENABLED" value="false" />
<option name="INVERSE_CLASS_FILLTERS" value="false" />
<option name="SUSPEND_POLICY" value="SuspendAll" />
</default_breakpoint_settings>
<filter>
<option name="PATTERN" value="com.sun.*" />
<option name="ENABLED" value="true" />
</filter>
<filter>
<option name="PATTERN" value="java.*" />
<option name="ENABLED" value="true" />
</filter>
<filter>
<option name="PATTERN" value="javax.*" />
<option name="ENABLED" value="true" />
</filter>
<filter>
<option name="PATTERN" value="org.omg.*" />
<option name="ENABLED" value="true" />
</filter>
<filter>
<option name="PATTERN" value="sun.*" />
<option name="ENABLED" value="true" />
</filter>
<filter>
<option name="PATTERN" value="junit.*" />
<option name="ENABLED" value="true" />
</filter>
</component>
<component name="EjbViewSettings">
<EjbView showMembers="false" autoscrollToSource="false" />
</component>
<component name="ErrorTreeViewConfiguration">
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
<option name="HIDE_WARNINGS" value="false" />
</component>
<component name="FavoritesManager">
<favorites_list name="cas-client" />
</component>
<component name="FavoritesProjectViewPane">
<subPane subId="cas-client">
<PATH>
<PATH_ELEMENT>
<option name="myItemId" />
<option name="myItemType" value="com.intellij.ide.favoritesTreeView.FavoritesTreeNodeDescriptor" />
</PATH_ELEMENT>
</PATH>
</subPane>
</component>
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="assembly.xml" pinned="false" current="true" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/assembly.xml">
<provider selected="true" editor-type-id="text-editor">
<state line="27" column="50" selection-start="659" selection-end="659" vertical-scroll-proportion="0.5617284">
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FindManager">
<FindUsagesManager>
<setting name="OPEN_NEW_TAB" value="false" />
</FindUsagesManager>
</component>
<component name="HierarchyBrowserManager">
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
<option name="SORT_ALPHABETICALLY" value="false" />
<option name="HIDE_CLASSES_WHERE_METHOD_NOT_IMPLEMENTED" value="false" />
</component>
<component name="InspectionManager">
<option name="AUTOSCROLL_TO_SOURCE" value="false" />
<option name="SPLITTER_PROPORTION" value="0.5" />
<option name="GROUP_BY_SEVERITY" value="false" />
<option name="FILTER_RESOLVED_ITEMS" value="true" />
<option name="ANALYZE_TEST_SOURCES" value="true" />
<option name="SHOW_DIFF_WITH_PREVIOUS_RUN" value="false" />
<option name="SCOPE_TYPE" value="1" />
<option name="CUSTOM_SCOPE_NAME" value="" />
<option name="SHOW_ONLY_DIFF" value="false" />
<option name="myCurrentProfileName" value="Default" />
</component>
<component name="J2EEProjectPane" />
<component name="JspContextManager" />
<component name="LvcsProjectConfiguration">
<option name="ADD_LABEL_ON_PROJECT_OPEN" value="true" />
<option name="ADD_LABEL_ON_PROJECT_COMPILATION" value="true" />
<option name="ADD_LABEL_ON_FILE_PACKAGE_COMPILATION" value="true" />
<option name="ADD_LABEL_ON_PROJECT_MAKE" value="true" />
<option name="ADD_LABEL_ON_RUNNING" value="true" />
<option name="ADD_LABEL_ON_DEBUGGING" value="true" />
<option name="ADD_LABEL_ON_UNIT_TEST_PASSED" value="true" />
<option name="ADD_LABEL_ON_UNIT_TEST_FAILED" value="true" />
</component>
<component name="ModuleEditorState">
<option name="LAST_EDITED_MODULE_NAME" />
<option name="LAST_EDITED_TAB_NAME" />
</component>
<component name="NamedScopeManager" />
<component name="PackagesPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="cas-client.ipr" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</component>
<component name="PerforceChangeBrowserSettings">
<option name="USE_CLIENT_FILTER" value="true" />
<option name="CLIENT" value="" />
</component>
<component name="PerforceConfiguration">
<option name="PORT" value="magic:1666" />
<option name="USER" value="" />
<option name="PASSWORD" value="" />
<option name="CLIENT" value="" />
<option name="TRACE" value="false" />
<option name="PERFORCE_STATUS" value="true" />
<option name="CHANGELIST_OPTION" value="false" />
<option name="SYSTEMROOT" value="" />
<option name="P4_EXECUTABLE" value="p4" />
<option name="SHOW_BRANCH_HISTORY" value="false" />
<option name="GENERATE_COMMENT" value="false" />
<option name="SYNC_OPTION" value="Sync" />
<option name="PUT_FOCUS_INTO_COMMENT" value="false" />
<option name="SHOW_CHECKIN_OPTIONS" value="true" />
<option name="FORCE_NON_EMPTY_COMMENT" value="true" />
<option name="LAST_COMMIT_MESSAGE" value="" />
<option name="SAVE_LAST_COMMIT_MESSAGE" value="true" />
<option name="CHECKIN_DIALOG_SPLITTER_PROPORTION" value="0.8" />
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
<option name="OPTIMIZE_IMPORTS_BEFORE_FILE_COMMIT" value="false" />
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
<option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
<option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
<option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
</component>
<component name="PerforceDirect.Settings">
<option name="useP4CONFIG" value="true" />
<option name="port" value="&lt;perforce_server&gt;:1666" />
<option name="client" value="" />
<option name="user" value="" />
<option name="passwd" value="" />
<option name="showCmds" value="false" />
<option name="useNativeApi" value="true" />
<option name="pathToExec" value="p4" />
<option name="useCustomPathToExec" value="false" />
<option name="SYNC_FORCE" value="false" />
<option name="SYNC_RUN_RESOLVE" value="true" />
<option name="REVERT_UNCHANGED_FILES" value="true" />
<option name="CHARSET" value="none" />
<option name="SHOW_BRANCHES_HISTORY" value="true" />
<option name="ENABLED" value="true" />
<option name="USE_LOGIN" value="false" />
<option name="LOGIN_SILENTLY" value="false" />
<option name="INTEGRATE_RUN_RESOLVE" value="true" />
<option name="INTEGRATE_REVERT_UNCHANGED" value="true" />
<option name="SERVER_TIMEOUT" value="20000" />
</component>
<component name="ProjectLevelVcsManager">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkin" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<OptionsSetting value="true" id="Undo Check Out" />
<OptionsSetting value="true" id="Compare with SourceSafe Version" />
<OptionsSetting value="true" id="Get Latest Version" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="cas-client.ipr" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="cas-client-uportal" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="cas-client.ipr" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="cas-client-uportal" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/cas-client-uportal" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="cas-client.ipr" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="cas-client-core" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="cas-client.ipr" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="cas-client-core" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/cas-client-core" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="cas-client.ipr" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="cas-client" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="cas-client.ipr" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="cas-client" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</component>
<component name="ProjectReloadState">
<option name="STATE" value="0" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="0.5" version="1" splitterProportion="0.5">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<showStructure Favorites="false" ProjectPane="false" Scope="false" PackagesPane="false" />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
</navigator>
</component>
<component name="ProjectViewSettings">
<navigator currentView="ProjectPane" flattenPackages="false" showMembers="false" showStructure="false" autoscrollToSource="false" splitterProportion="0.5" />
<view id="ProjectPane">
<expanded_node type="directory" url="file://$PROJECT_DIR$" />
</view>
<view id="SourcepathPane" />
<view id="ClasspathPane" />
</component>
<component name="PropertiesComponent">
<property name="GoToFile.includeJavaFiles" value="false" />
<property name="GoToClass.toSaveIncludeLibraries" value="false" />
<property name="MemberChooser.sorted" value="false" />
<property name="MemberChooser.showClasses" value="true" />
<property name="GoToClass.includeLibraries" value="false" />
<property name="MemberChooser.copyJavadoc" value="false" />
</component>
<component name="ReadonlyStatusHandler">
<option name="SHOW_DIALOG" value="true" />
</component>
<component name="RecentsManager" />
<component name="RestoreUpdateTree" />
<component name="RunManager">
<configuration default="true" type="Application" factoryName="Application" enabled="false" merge="false">
<option name="MAIN_CLASS_NAME" />
<option name="VM_PARAMETERS" />
<option name="PROGRAM_PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<module name="" />
</configuration>
<configuration default="true" type="Remote" factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" value="javadebug" />
<option name="HOST" value="localhost" />
<option name="PORT" value="5005" />
</configuration>
<configuration default="true" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ADDITIONAL_CLASS_PATH" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="wholeProject" />
</option>
</configuration>
<configuration default="true" type="Applet" factoryName="Applet">
<module name="" />
<option name="MAIN_CLASS_NAME" />
<option name="HTML_FILE_NAME" />
<option name="HTML_USED" value="false" />
<option name="WIDTH" value="400" />
<option name="HEIGHT" value="300" />
<option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
<option name="VM_PARAMETERS" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
</configuration>
</component>
<component name="ScopeViewComponent">
<subPane subId="Project">
<PATH>
<PATH_ELEMENT USER_OBJECT="Root">
<option name="myItemId" value="" />
<option name="myItemType" value="" />
</PATH_ELEMENT>
</PATH>
</subPane>
</component>
<component name="SelectInManager" />
<component name="StarteamConfiguration">
<option name="SERVER" value="" />
<option name="PORT" value="49201" />
<option name="USER" value="" />
<option name="PASSWORD" value="" />
<option name="PROJECT" value="" />
<option name="VIEW" value="" />
<option name="ALTERNATIVE_WORKING_PATH" value="" />
<option name="LOCK_ON_CHECKOUT" value="false" />
<option name="UNLOCK_ON_CHECKIN" value="false" />
</component>
<component name="StructuralSearchPlugin" />
<component name="StructureViewFactory">
<option name="AUTOSCROLL_MODE" value="true" />
<option name="AUTOSCROLL_FROM_SOURCE" value="false" />
<option name="ACTIVE_ACTIONS" value="" />
</component>
<component name="Struts Assistant">
<option name="showInputs" value="true" />
<option name="resources">
<value>
<option name="strutsPath" />
<option name="strutsHelp" />
</value>
</option>
<option name="selectedTaglibs" />
<option name="selectedTaglibs" />
<option name="myStrutsValidationEnabled" value="true" />
<option name="myTilesValidationEnabled" value="true" />
<option name="myValidatorValidationEnabled" value="true" />
<option name="myReportErrorsAsWarnings" value="true" />
</component>
<component name="SvnChangesBrowserSettings">
<option name="USE_AUTHOR_FIELD" value="true" />
<option name="AUTHOR" value="" />
<option name="LOCATION" value="" />
<option name="USE_PROJECT_SETTINGS" value="true" />
<option name="USE_ALTERNATE_LOCATION" value="false" />
</component>
<component name="SvnConfiguration">
<option name="USER" value="" />
<option name="PASSWORD" value="" />
<option name="PROCESS_UNRESOLVED" value="false" />
<option name="LAST_MERGED_REVISION" />
<option name="UPDATE_RUN_STATUS" value="false" />
<option name="UPDATE_RECURSIVELY" value="true" />
<option name="MERGE_DRY_RUN" value="false" />
<configuration useDefault="true">/home/battags/.subversion</configuration>
</component>
<component name="TodoView" selected-index="0">
<todo-panel id="selected-file">
<are-packages-shown value="false" />
<are-modules-shown value="false" />
<flatten-packages value="false" />
<is-autoscroll-to-source value="true" />
</todo-panel>
<todo-panel id="all">
<are-packages-shown value="true" />
<are-modules-shown value="false" />
<flatten-packages value="false" />
<is-autoscroll-to-source value="true" />
</todo-panel>
</component>
<component name="ToolWindowManager">
<frame x="-4" y="26" width="1928" height="1152" extended-state="7" />
<editor active="false" />
<layout>
<window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
<window_info id="Changes" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.33073172" order="11" />
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="4" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="1" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="1" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="4" />
<window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="12" />
<window_info id="IDEtalk" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3287805" order="9" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3304762" order="7" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="1" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="0" />
<window_info id="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3295238" order="13" />
<window_info id="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="7" />
<window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="10" />
<window_info id="File View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="6" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32977018" order="0" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="2" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="6" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="2" />
<window_info id="Aspects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="5" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="5" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="0" />
<window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="2" />
<window_info id="EJB" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="3" />
</layout>
</component>
<component name="VCS.FileViewConfiguration">
<option name="SELECTED_STATUSES" value="DEFAULT" />
<option name="SELECTED_COLUMNS" value="DEFAULT" />
<option name="SHOW_FILTERS" value="true" />
<option name="CUSTOMIZE_VIEW" value="true" />
<option name="SHOW_FILE_HISTORY_AS_TREE" value="true" />
</component>
<component name="VcsManagerConfiguration">
<option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
<option name="PERFORM_UPDATE_IN_BACKGROUND" value="false" />
<option name="PERFORM_COMMIT_IN_BACKGROUND" value="false" />
<option name="PUT_FOCUS_INTO_COMMENT" value="false" />
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
<option name="LAST_COMMIT_MESSAGE" value="removed" />
<option name="SAVE_LAST_COMMIT_MESSAGE" value="true" />
<option name="CHECKIN_DIALOG_SPLITTER_PROPORTION" value="0.8" />
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
<option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
<option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
<option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
<option name="ERROR_OCCURED" value="false" />
<option name="ACTIVE_VCS_NAME" value="svn" />
<option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
<option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
<option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
<MESSAGE value="updated configuration files" />
<MESSAGE value="CASC-15&#10;&#10;added more debugging" />
<MESSAGE value="removed" />
</component>
<component name="VssConfiguration">
<option name="CLIENT_PATH" value="" />
<option name="SRCSAFEINI_PATH" value="" />
<option name="USER_NAME" value="" />
<option name="PWD" value="" />
<option name="VSS_IS_INITIALIZED" value="true" />
<CheckoutOptions>
<option name="COMMENT" value="" />
<option name="DO_NOT_GET_LATEST_VERSION" value="false" />
<option name="REPLACE_WRITABLE" value="false" />
<option name="RECURSIVE" value="false" />
</CheckoutOptions>
<CheckinOptions>
<option name="COMMENT" value="" />
<option name="KEEP_CHECKED_OUT" value="false" />
<option name="RECURSIVE" value="false" />
</CheckinOptions>
<AddOptions>
<option name="COMMENT" value="" />
<option name="STORE_ONLY_LATEST_VERSION" value="false" />
<option name="CHECK_OUT_IMMEDIATELY" value="false" />
<option name="FILE_TYPE" value="0" />
</AddOptions>
<UndocheckoutOptions>
<option name="MAKE_WRITABLE" value="false" />
<option name="REPLACE_LOCAL_COPY" value="0" />
<option name="RECURSIVE" value="false" />
</UndocheckoutOptions>
<GetOptions>
<option name="REPLACE_WRITABLE" value="0" />
<option name="MAKE_WRITABLE" value="false" />
<option name="ANSWER_NEGATIVELY" value="false" />
<option name="ANSWER_POSITIVELY" value="false" />
<option name="RECURSIVE" value="false" />
<option name="VERSION" />
</GetOptions>
<VssConfigurableExcludedFilesTag />
</component>
<component name="WebViewSettings">
<webview flattenPackages="false" showMembers="false" autoscrollToSource="false" />
</component>
<component name="antWorkspaceConfiguration">
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
<option name="FILTER_TARGETS" value="false" />
</component>
<component name="com.intellij.ide.util.scopeChooser.ScopeChooserConfigurable" proportions="" version="1">
<option name="myLastEditedConfigurable" />
</component>
<component name="com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectRootMasterDetailsConfigurable" proportions="0.43625" version="1">
<option name="myPlainMode" value="false" />
<option name="myLastEditedConfigurable" value="cas-client-core" />
</component>
<component name="com.intellij.profile.ui.ErrorOptionsConfigurable" proportions="" version="1">
<option name="myLastEditedConfigurable" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/cas-client.iws">
<provider selected="true" editor-type-id="text-editor">
<state line="24" column="44" selection-start="1385" selection-end="1385" vertical-scroll-proportion="0.026113672">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cas-client-core/src/main/java/org/jasig/cas/client/web/filter/TicketValidationFilter.java">
<provider selected="true" editor-type-id="text-editor">
<state line="113" column="40" selection-start="5068" selection-end="5068" vertical-scroll-proportion="1.6516192">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cas-client-core/src/main/java/org/jasig/cas/client/web/filter/AbstractCasFilter.java">
<provider selected="true" editor-type-id="text-editor">
<state line="111" column="28" selection-start="3720" selection-end="3720" vertical-scroll-proportion="0.8168168">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cas-client-core/src/main/java/org/jasig/cas/client/web/filter/AuthorizationFilter.java">
<provider selected="true" editor-type-id="text-editor">
<state line="45" column="7" selection-start="1648" selection-end="1648" vertical-scroll-proportion="0.13663663">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cas-client-core/src/main/java/org/jasig/cas/client/web/filter/AuthenticationFilter.java">
<provider selected="true" editor-type-id="text-editor">
<state line="74" column="50" selection-start="3022" selection-end="3022" vertical-scroll-proportion="0.7747748">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cas-client-uportal/src/main/java/org/jasig/cas/client/integration/uportal/ThreadLocalAwareCasServiceFilter.java">
<provider selected="true" editor-type-id="text-editor">
<state line="25" column="45" selection-start="973" selection-end="973" vertical-scroll-proportion="0.2777778">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cas-client-core/src/main/java/org/jasig/cas/client/web/filter/AssertionThreadLocalFilter.java">
<provider selected="true" editor-type-id="text-editor">
<state line="27" column="19" selection-start="972" selection-end="972" vertical-scroll-proportion="0.2843602">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cas-client-core/src/main/java/org/jasig/cas/client/validation/Saml10TicketValidator.java">
<provider selected="true" editor-type-id="text-editor">
<state line="45" column="25" selection-start="1485" selection-end="1485" vertical-scroll-proportion="0.6">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cas-client-uportal/pom.xml">
<provider selected="true" editor-type-id="text-editor">
<state line="79" column="61" selection-start="3039" selection-end="3039" vertical-scroll-proportion="0.7846154">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cas-client-core/pom.xml">
<provider selected="true" editor-type-id="text-editor">
<state line="134" column="33" selection-start="4668" selection-end="4668" vertical-scroll-proportion="3.0923078">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/pom.xml">
<provider selected="true" editor-type-id="text-editor">
<state line="194" column="51" selection-start="6977" selection-end="6977" vertical-scroll-proportion="0.8138462">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/assembly.xml">
<provider selected="true" editor-type-id="text-editor">
<state line="27" column="50" selection-start="659" selection-end="659" vertical-scroll-proportion="0.5617284">
<folding />
</state>
</provider>
</entry>
</component>
<component name="editorManager" />
</project>

218
pom.xml
View File

@ -1,218 +0,0 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jasig.cas</groupId>
<version>3.1-m1</version>
<artifactId>cas-client</artifactId>
<packaging>pom</packaging>
<name>JA-SIG CAS Client for Java</name>
<description>JA-SIG CAS Client for Java is the integration point for applications that want to speak with a CAS
server, either via the CAS 1.0 or CAS 2.0 protocol.
</description>
<url>http://www.ja-sig.org/products/cas/</url>
<issueManagement>
<system>JIRA</system>
<url>http://www.ja-sig.org/issues</url>
</issueManagement>
<ciManagement>
<system>QuickBuild</system>
<url>http://developer.ja-sig.org/builds/</url>
</ciManagement>
<inceptionYear>2006</inceptionYear>
<mailingLists>
<mailingList>
<name>CAS Community Discussion List</name>
<subscribe>http://tp.its.yale.edu/mailman/listinfo/cas</subscribe>
<unsubscribe>http://tp.its.yale.edu/mailman/listinfo/cas</unsubscribe>
<post>cas@tp.its.yale.edu</post>
<archive>http://tp.its.yale.edu/pipermail/cas/</archive>
<otherArchives>
<otherArchive>http://news.gmane.org/gmane.comp.java.jasig.cas.user</otherArchive>
</otherArchives>
</mailingList>
<mailingList>
<name>CAS Developers Discussion List</name>
<subscribe>http://tp.its.yale.edu/mailman/listinfo/cas-dev</subscribe>
<unsubscribe>http://tp.its.yale.edu/mailman/listinfo/cas-dev</unsubscribe>
<post>cas-dev@tp.its.yale.edu</post>
<archive>http://tp.its.yale.edu/pipermail/cas-dev/</archive>
<otherArchives>
<otherArchive>http://news.gmane.org/gmane.comp.java.jasig.cas.devel</otherArchive>
</otherArchives>
</mailingList>
</mailingLists>
<developers>
<developer>
<id>battags</id>
<name>Scott Battaglia</name>
<email>scott_battaglia@rutgers.edu</email>
<url>http://www.scottbattaglia.com</url>
<organization>Rutgers, the State University of New Jersey</organization>
<organizationUrl>http://www.rutgers.edu</organizationUrl>
<roles>
<role>Project Admin</role>
<role>Developer</role>
</roles>
<timezone>-5</timezone>
</developer>
</developers>
<licenses>
<license>
<name>JA-SIG License for Use</name>
<url>http://www.ja-sig.org/products/cas/overview/license/</url>
<distribution>manual</distribution>
</license>
</licenses>
<scm>
<connection>scm:cvs:pserver:anonymous:@developer.ja-sig.org:2401/home/cvs/jasig:cas-clients/java-client
</connection>
<developerConnection>
scm:cvs:pserver:${username}@developer.ja-sig.org:2401/home/cvs/jasig:cas-clients/java-client
</developerConnection>
<url>http://developer.ja-sig.org/source/browse/jasig/cas-clients/java-client</url>
</scm>
<organization>
<name>JA-SIG</name>
<url>http://www.ja-sig.org</url>
</organization>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-SNAPSHOT</version>
<configuration>
<descriptors>
<descriptor>${basedir}/assembly.xml</descriptor>
</descriptors>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>logkit</groupId>
<artifactId>logkit</artifactId>
</exclusion>
<exclusion>
<groupId>avalon-framework</groupId>
<artifactId>avalon-framework</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jasig.cas</groupId>
<artifactId>cas-server-core</artifactId>
<version>3.1-m1</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>xml-security</groupId>
<artifactId>xmlsec</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jndi.ldap</groupId>
<artifactId>ldapbp</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-binding</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-webflow</artifactId>
</exclusion>
<exclusion>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-ldap</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>2.0.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>2.0.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>jasig</id>
<name>JA-SIG Maven Repository</name>
<url>http://developer.ja-sig.org/maven2/</url>
<layout>default</layout>
</repository>
<repository>
<id>ibiblio</id>
<name>Ibiblio Repository</name>
<url>http://www.ibiblio.org/maven2</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>mojo</id>
<name>Codehaus Repository</name>
<url>http://snapshots.maven.codehaus.org/maven2</url>
</pluginRepository>
<pluginRepository>
<id>ibiblio</id>
<name>Ibiblio Repository</name>
<url>http://www.ibiblio.org/maven2</url>
</pluginRepository>
</pluginRepositories>
<modules>
<module>cas-client-core</module>
<module>cas-client-uportal</module>
</modules>
</project>