org.jasig.cas.web
Class ServiceValidateController

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.context.support.WebApplicationObjectSupport
          extended by org.springframework.web.servlet.support.WebContentGenerator
              extended by org.springframework.web.servlet.mvc.AbstractController
                  extended by org.jasig.cas.web.DelegateController
                      extended by org.jasig.cas.web.ServiceValidateController
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.mvc.Controller

public class ServiceValidateController
extends DelegateController

Process the /validate and /serviceValidate URL requests.

Obtain the Service Ticket and Service information and present them to the CAS validation services. Receive back an Assertion containing the user Principal and (possibly) a chain of Proxy Principals. Store the Assertion in the Model and chain to a View to generate the appropriate response (CAS 1, CAS 2 XML, SAML, ...).

Since:
3.0
Version:
$Revision$ $Date$
Author:
Scott Battaglia

Field Summary
 
Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator
METHOD_GET, METHOD_HEAD, METHOD_POST
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
ServiceValidateController()
           
 
Method Summary
 boolean canHandle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Determine if a DelegateController subclass can handle the current request.
protected  Credentials getServiceCredentialsFromRequest(javax.servlet.http.HttpServletRequest request)
          Overrideable method to determine which credentials to use to grant a proxy granting ticket.
protected  org.springframework.web.servlet.ModelAndView handleRequestInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  void initBinder(javax.servlet.http.HttpServletRequest request, org.springframework.web.bind.ServletRequestDataBinder binder)
           
protected  void onSuccessfulValidation(String serviceTicketId, Assertion assertion)
           
 void setArgumentExtractor(ArgumentExtractor argumentExtractor)
           
 void setCentralAuthenticationService(CentralAuthenticationService centralAuthenticationService)
           
 void setFailureView(String failureView)
           
 void setProxyHandler(ProxyHandler proxyHandler)
           
 void setSuccessView(String successView)
           
 void setValidationSpecificationClass(Class<?> validationSpecificationClass)
           
 
Methods inherited from class org.springframework.web.servlet.mvc.AbstractController
handleRequest, isSynchronizeOnSession, setSynchronizeOnSession
 
Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceValidateController

public ServiceValidateController()
Method Detail

getServiceCredentialsFromRequest

protected Credentials getServiceCredentialsFromRequest(javax.servlet.http.HttpServletRequest request)
Overrideable method to determine which credentials to use to grant a proxy granting ticket. Default is to use the pgtUrl.

Parameters:
request - the HttpServletRequest object.
Returns:
the credentials or null if there was an error or no credentials provided.

initBinder

protected void initBinder(javax.servlet.http.HttpServletRequest request,
                          org.springframework.web.bind.ServletRequestDataBinder binder)

handleRequestInternal

protected final org.springframework.web.servlet.ModelAndView handleRequestInternal(javax.servlet.http.HttpServletRequest request,
                                                                                   javax.servlet.http.HttpServletResponse response)
                                                                            throws Exception
Specified by:
handleRequestInternal in class org.springframework.web.servlet.mvc.AbstractController
Throws:
Exception

onSuccessfulValidation

protected void onSuccessfulValidation(String serviceTicketId,
                                      Assertion assertion)

canHandle

public boolean canHandle(javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response)
Determine if a DelegateController subclass can handle the current request.

Specified by:
canHandle in class DelegateController
Parameters:
request - the current request
response - the response
Returns:
true if the controller can handler the request, false otherwise

setCentralAuthenticationService

public final void setCentralAuthenticationService(CentralAuthenticationService centralAuthenticationService)
Parameters:
centralAuthenticationService - The centralAuthenticationService to set.

setArgumentExtractor

public final void setArgumentExtractor(ArgumentExtractor argumentExtractor)

setValidationSpecificationClass

public final void setValidationSpecificationClass(Class<?> validationSpecificationClass)
Parameters:
validationSpecificationClass - The authenticationSpecificationClass to set.

setFailureView

public final void setFailureView(String failureView)
Parameters:
failureView - The failureView to set.

setSuccessView

public final void setSuccessView(String successView)
Parameters:
successView - The successView to set.

setProxyHandler

public final void setProxyHandler(ProxyHandler proxyHandler)
Parameters:
proxyHandler - The proxyHandler to set.


Copyright © 2004-2013 Jasig. All Rights Reserved.