diff --git a/cas-client-core/src/main/java/org/jasig/cas/client/validation/AbstractTicketValidationFilter.java b/cas-client-core/src/main/java/org/jasig/cas/client/validation/AbstractTicketValidationFilter.java
index e9e1c5c..7f65046 100644
--- a/cas-client-core/src/main/java/org/jasig/cas/client/validation/AbstractTicketValidationFilter.java
+++ b/cas-client-core/src/main/java/org/jasig/cas/client/validation/AbstractTicketValidationFilter.java
@@ -38,10 +38,13 @@ import java.io.IOException;
*
* This filter can be configured with the following values:
*
- * redirectAfterValidation - redirect the CAS client to the same URL without the ticket.
+ * redirectAfterValidation - redirect the CAS client to the same URL without the ticket.
+ * (default: true, Will be forced to false when {@link #useSession} is false.)
* exceptionOnValidationFailure - throw an exception if the validation fails. Otherwise, continue
- * processing.
- * useSession - store any of the useful information in a session attribute.
+ * processing. (default: true)
+ * useSession - store any of the useful information in a session attribute. (default: true)
+ * hostnameVerifier - name of class implementing a {@link HostnameVerifier}.
+ * hostnameVerifierConfig - name of configuration class (constructor argument of verifier).
*
*
* @author Scott Battaglia
@@ -58,11 +61,15 @@ public abstract class AbstractTicketValidationFilter extends AbstractCasFilter {
* successful validation to remove the ticket parameter from the query
* string.
*/
- private boolean redirectAfterValidation = false;
+ private boolean redirectAfterValidation = true;
/** Determines whether an exception is thrown when there is a ticket validation failure. */
private boolean exceptionOnValidationFailure = true;
+ /**
+ * Specify whether the Assertion should be stored in a session
+ * attribute {@link AbstractCasFilter#CONST_CAS_ASSERTION}.
+ */
private boolean useSession = true;
/**
@@ -74,7 +81,7 @@ public abstract class AbstractTicketValidationFilter extends AbstractCasFilter {
protected TicketValidator getTicketValidator(final FilterConfig filterConfig) {
return this.ticketValidator;
}
-
+
/**
* Gets the configured {@link HostnameVerifier} to use for HTTPS connections
* if one is configured for this filter.
@@ -103,12 +110,12 @@ public abstract class AbstractTicketValidationFilter extends AbstractCasFilter {
log.trace("Setting redirectAfterValidation parameter: " + this.redirectAfterValidation);
setUseSession(parseBoolean(getPropertyFromInitParams(filterConfig, "useSession", "true")));
log.trace("Setting useSession parameter: " + this.useSession);
-
+
if (!this.useSession && this.redirectAfterValidation) {
log.warn("redirectAfterValidation parameter may not be true when useSession parameter is false. Resetting it to false in order to prevent infinite redirects.");
setRedirectAfterValidation(false);
}
-
+
setTicketValidator(getTicketValidator(filterConfig));
super.initInternal(filterConfig);
}
@@ -142,7 +149,7 @@ public abstract class AbstractTicketValidationFilter extends AbstractCasFilter {
* @param assertion the successful Assertion from the server.
*/
protected void onSuccessfulValidation(final HttpServletRequest request, final HttpServletResponse response, final Assertion assertion) {
- // nothing to do here.
+ // nothing to do here.
}
/**