public abstract class AbstractServiceValidateController
extends org.apereo.cas.web.AbstractDelegateController
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, ...).
| Constructor and Description |
|---|
AbstractServiceValidateController()
Instantiates a new Service validate controller.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Map<java.lang.String,?> |
augmentSuccessViewModelObjects(org.apereo.cas.validation.Assertion assertion)
Augment success view model objects.
|
boolean |
canHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
org.springframework.web.servlet.View |
getFailureView()
Return the failureView.
|
protected org.apereo.cas.authentication.Credential |
getServiceCredentialsFromRequest(org.apereo.cas.authentication.principal.WebApplicationService service,
javax.servlet.http.HttpServletRequest request)
Overrideable method to determine which credentials to use to grant a
proxy granting ticket.
|
org.springframework.web.servlet.View |
getSuccessView()
Return the successView.
|
protected org.springframework.web.servlet.ModelAndView |
handleRequestInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected org.springframework.web.servlet.ModelAndView |
handleTicketValidation(javax.servlet.http.HttpServletRequest request,
org.apereo.cas.authentication.principal.WebApplicationService service,
java.lang.String serviceTicketId)
Handle ticket validation model and view.
|
protected void |
initBinder(javax.servlet.http.HttpServletRequest request,
org.springframework.web.bind.ServletRequestDataBinder binder)
Inits the binder with the required fields.
|
protected void |
onSuccessfulValidation(java.lang.String serviceTicketId,
org.apereo.cas.validation.Assertion assertion)
Triggered on successful validation events.
|
void |
setArgumentExtractor(org.apereo.cas.web.support.ArgumentExtractor argumentExtractor) |
void |
setAuthenticationContextValidator(org.apereo.cas.authentication.AuthenticationContextValidator authenticationContextValidator) |
void |
setAuthenticationSystemSupport(org.apereo.cas.authentication.AuthenticationSystemSupport authenticationSystemSupport) |
void |
setAuthnContextAttribute(java.lang.String authnContextAttribute) |
void |
setCentralAuthenticationService(org.apereo.cas.CentralAuthenticationService centralAuthenticationService) |
void |
setFailureView(org.springframework.web.servlet.View failureView) |
void |
setJsonView(org.springframework.web.servlet.View jsonView) |
void |
setMultifactorTriggerSelectionStrategy(org.apereo.cas.authentication.MultifactorTriggerSelectionStrategy strategy) |
void |
setProxyHandler(org.apereo.cas.ticket.proxy.ProxyHandler proxyHandler) |
void |
setServicesManager(org.apereo.cas.services.ServicesManager servicesManager)
Sets the services manager.
|
void |
setSuccessView(org.springframework.web.servlet.View successView) |
void |
setValidationSpecification(org.apereo.cas.validation.ValidationSpecification validationSpecificationClass) |
protected org.apache.commons.lang3.tuple.Pair<java.lang.Boolean,java.util.Optional<org.apereo.cas.services.MultifactorAuthenticationProvider>> |
validateAuthenticationContext(org.apereo.cas.validation.Assertion assertion,
javax.servlet.http.HttpServletRequest request)
Validate authentication context pair.
|
public AbstractServiceValidateController()
protected org.apereo.cas.authentication.Credential getServiceCredentialsFromRequest(org.apereo.cas.authentication.principal.WebApplicationService service,
javax.servlet.http.HttpServletRequest request)
service - the webapp service requesting proxyrequest - the HttpServletRequest object.protected org.apache.commons.lang3.tuple.Pair<java.lang.Boolean,java.util.Optional<org.apereo.cas.services.MultifactorAuthenticationProvider>> validateAuthenticationContext(org.apereo.cas.validation.Assertion assertion,
javax.servlet.http.HttpServletRequest request)
assertion - the assertionrequest - the requestprotected void initBinder(javax.servlet.http.HttpServletRequest request,
org.springframework.web.bind.ServletRequestDataBinder binder)
renew is required.request - the requestbinder - the binderprotected org.springframework.web.servlet.ModelAndView handleRequestInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
handleRequestInternal in class org.apereo.cas.web.AbstractDelegateControllerjava.lang.Exceptionprotected org.springframework.web.servlet.ModelAndView handleTicketValidation(javax.servlet.http.HttpServletRequest request,
org.apereo.cas.authentication.principal.WebApplicationService service,
java.lang.String serviceTicketId)
request - the requestservice - the serviceserviceTicketId - the service ticket idprotected void onSuccessfulValidation(java.lang.String serviceTicketId,
org.apereo.cas.validation.Assertion assertion)
serviceTicketId - the service ticket idassertion - the assertionprotected java.util.Map<java.lang.String,?> augmentSuccessViewModelObjects(org.apereo.cas.validation.Assertion assertion)
assertion - the assertionpublic boolean canHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
canHandle in class org.apereo.cas.web.AbstractDelegateControllerpublic void setCentralAuthenticationService(org.apereo.cas.CentralAuthenticationService centralAuthenticationService)
centralAuthenticationService - The centralAuthenticationService to
set.public void setArgumentExtractor(org.apereo.cas.web.support.ArgumentExtractor argumentExtractor)
public void setMultifactorTriggerSelectionStrategy(org.apereo.cas.authentication.MultifactorTriggerSelectionStrategy strategy)
public void setValidationSpecification(org.apereo.cas.validation.ValidationSpecification validationSpecificationClass)
validationSpecificationClass - The authenticationSpecificationClass
to set.public void setFailureView(org.springframework.web.servlet.View failureView)
failureView - The failureView to set.public org.springframework.web.servlet.View getFailureView()
public void setSuccessView(org.springframework.web.servlet.View successView)
successView - The successView to set.public org.springframework.web.servlet.View getSuccessView()
public void setProxyHandler(org.apereo.cas.ticket.proxy.ProxyHandler proxyHandler)
proxyHandler - The proxyHandler to set.public void setServicesManager(org.apereo.cas.services.ServicesManager servicesManager)
servicesManager - the new services managerpublic void setAuthenticationSystemSupport(org.apereo.cas.authentication.AuthenticationSystemSupport authenticationSystemSupport)
public void setAuthenticationContextValidator(org.apereo.cas.authentication.AuthenticationContextValidator authenticationContextValidator)
public void setJsonView(org.springframework.web.servlet.View jsonView)
public void setAuthnContextAttribute(java.lang.String authnContextAttribute)