public class MultiFactorServiceValidateController
extends org.jasig.cas.web.DelegateController
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, ...).
This implementation differs from the default, in that the validation of
the incoming request is handled by an instance of
AbstractMultiFactorAuthenticationProtocolValidationSpecification. Validation
errors are signaled back to this controller via exceptions, the result of which
are passed down to the error view.
This extension, additionally, will also attempt to map the validation parameter
MultiFactorAuthenticationSupportingWebApplicationService.CONST_PARAM_AUTHN_METHOD
in order to activate validation of mfa requests. Otherwise, it's compliant with the default
implementation.
| Constructor and Description |
|---|
MultiFactorServiceValidateController() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected org.jasig.cas.authentication.principal.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)
Handle the request.
|
protected void |
initBinder(javax.servlet.http.HttpServletRequest request,
org.springframework.web.bind.ServletRequestDataBinder binder)
Initialize the binder with the required fields.
|
protected void |
onSuccessfulValidation(String serviceTicketId,
org.jasig.cas.validation.Assertion assertion)
Template method to handle post successful validation event by extensions.
|
void |
setArgumentExtractor(org.jasig.cas.web.support.ArgumentExtractor argumentExtractor) |
void |
setCentralAuthenticationService(org.jasig.cas.CentralAuthenticationService centralAuthenticationService) |
void |
setFailureView(String failureView) |
void |
setProxyHandler(org.jasig.cas.ticket.proxy.ProxyHandler proxyHandler) |
void |
setSuccessView(String successView) |
void |
setValidationSpecificationClass(Class<AbstractMultiFactorAuthenticationProtocolValidationSpecification> validationSpecificationClass) |
handleRequest, isSynchronizeOnSession, setSynchronizeOnSessionapplyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isAlwaysMustRevalidate, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, preventCaching, setAlwaysMustRevalidate, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeadergetServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContextpublic MultiFactorServiceValidateController()
protected org.jasig.cas.authentication.principal.Credentials getServiceCredentialsFromRequest(javax.servlet.http.HttpServletRequest request)
request - the HttpServletRequest object.protected final void initBinder(javax.servlet.http.HttpServletRequest request,
org.springframework.web.bind.ServletRequestDataBinder binder)
request - the request objectbinder - the binder instanceprotected final org.springframework.web.servlet.ModelAndView handleRequestInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws Exception
Handle the request. Specially, abides by the default behavior specified in the ServiceValidateController
and then, invokes the getCommandClass() method to delegate the task of spec validation.
handleRequestInternal in class org.springframework.web.servlet.mvc.AbstractControllerrequest - request objectresponse - response objectModelAndView object pointing to either setSuccessView(String) or setFailureView(String)Exception - In case the authentication method cannot be retrieved by the binder from the incoming request.protected void onSuccessfulValidation(String serviceTicketId, org.jasig.cas.validation.Assertion assertion)
serviceTicketId - service ticket in validationassertion - the assertion generated after validationpublic final boolean canHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
canHandle in class org.jasig.cas.web.DelegateControllerpublic final void setCentralAuthenticationService(org.jasig.cas.CentralAuthenticationService centralAuthenticationService)
centralAuthenticationService - The centralAuthenticationService to
set.public final void setArgumentExtractor(org.jasig.cas.web.support.ArgumentExtractor argumentExtractor)
public final void setValidationSpecificationClass(Class<AbstractMultiFactorAuthenticationProtocolValidationSpecification> validationSpecificationClass)
validationSpecificationClass - The authenticationSpecificationClass
to set.public final void setFailureView(String failureView)
failureView - The failureView to set.public final void setSuccessView(String successView)
successView - The successView to set.public final void setProxyHandler(org.jasig.cas.ticket.proxy.ProxyHandler proxyHandler)
proxyHandler - The proxyHandler to set.Copyright © 2013-2015 Unicon Inc.. All Rights Reserved.