|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.cas.client.util.AbstractConfigurationFilter
org.jasig.cas.client.util.AbstractCasFilter
org.jasig.cas.client.validation.AbstractTicketValidationFilter
public abstract class AbstractTicketValidationFilter
The filter that handles all the work of validating ticket requests.
This filter can be configured with the following values:
redirectAfterValidation - redirect the CAS client to the same URL without the ticket.exceptionOnValidationFailure - throw an exception if the validation fails. Otherwise, continue
processing.useSession - store any of the useful information in a session attribute.
| Field Summary |
|---|
| Fields inherited from class org.jasig.cas.client.util.AbstractCasFilter |
|---|
CONST_CAS_ASSERTION, log |
| Constructor Summary | |
|---|---|
AbstractTicketValidationFilter()
|
|
| Method Summary | |
|---|---|
void |
doFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain filterChain)
|
protected TicketValidator |
getTicketValidator(javax.servlet.FilterConfig filterConfig)
Template method to return the appropriate validator. |
void |
init()
Initialization method. |
protected void |
initInternal(javax.servlet.FilterConfig filterConfig)
Controls the ordering of filter initialization and checking by defining a method that runs before the init. |
protected void |
onFailedValidation(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Template method that gets executed if validation fails. |
protected void |
onSuccessfulValidation(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Assertion assertion)
Template method that gets executed if ticket validation succeeds. |
protected boolean |
preFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain filterChain)
Pre-process the request before the normal filter process starts. |
void |
setExceptionOnValidationFailure(boolean exceptionOnValidationFailure)
|
void |
setRedirectAfterValidation(boolean redirectAfterValidation)
|
void |
setTicketValidator(TicketValidator ticketValidator)
|
void |
setUseSession(boolean useSession)
|
| Methods inherited from class org.jasig.cas.client.util.AbstractCasFilter |
|---|
constructServiceUrl, destroy, getArtifactParameterName, getServiceParameterName, init, setArtifactParameterName, setEncodeServiceUrl, setServerName, setService, setServiceParameterName |
| Methods inherited from class org.jasig.cas.client.util.AbstractConfigurationFilter |
|---|
getPropertyFromInitParams, isIgnoreInitConfiguration, loadFromContext, parseBoolean, setIgnoreInitConfiguration |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractTicketValidationFilter()
| Method Detail |
|---|
protected TicketValidator getTicketValidator(javax.servlet.FilterConfig filterConfig)
filterConfig - the FilterConfiguration that may be needed to construct a validator.
protected void initInternal(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
AbstractCasFilter
initInternal in class AbstractCasFilterfilterConfig - the original filter configuration.
javax.servlet.ServletException - if there is a problem.public void init()
AbstractCasFilter
init in class AbstractCasFilter
protected boolean preFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain filterChain)
throws java.io.IOException,
javax.servlet.ServletException
servletRequest - The servlet request.servletResponse - The servlet response.filterChain - the filter chain.
java.io.IOException - if there is an I/O problem
javax.servlet.ServletException - if there is a servlet problem.
protected void onSuccessfulValidation(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Assertion assertion)
request - the HttpServletRequest.response - the HttpServletResponse.assertion - the successful Assertion from the server.
protected void onFailedValidation(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
request - the HttpServletRequest.response - the HttpServletResponse.
public final void doFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain filterChain)
throws java.io.IOException,
javax.servlet.ServletException
java.io.IOException
javax.servlet.ServletExceptionpublic final void setTicketValidator(TicketValidator ticketValidator)
public final void setRedirectAfterValidation(boolean redirectAfterValidation)
public final void setExceptionOnValidationFailure(boolean exceptionOnValidationFailure)
public final void setUseSession(boolean useSession)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||