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() |
| Modifier and Type | Method and Description |
|---|---|
void |
addValidationSpecification(org.apereo.cas.validation.CasProtocolValidationSpecification validationSpecification)
Add validation specification.
|
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) |
protected void |
enforceTicketValidationAuthorizationFor(javax.servlet.http.HttpServletRequest request,
org.apereo.cas.authentication.principal.Service service,
org.apereo.cas.validation.Assertion assertion)
Enforce ticket validation authorization for.
|
org.springframework.web.servlet.View |
getFailureView() |
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() |
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)
Initialize the binder with the required fields.
|
protected void |
onSuccessfulValidation(java.lang.String serviceTicketId,
org.apereo.cas.validation.Assertion assertion)
Triggered on successful validation events.
|
protected void |
prepareForTicketValidation(javax.servlet.http.HttpServletRequest request,
org.apereo.cas.authentication.principal.WebApplicationService service,
java.lang.String serviceTicketId)
Prepare for ticket validation.
|
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.
|
protected org.apereo.cas.validation.Assertion |
validateServiceTicket(org.apereo.cas.authentication.principal.WebApplicationService service,
java.lang.String serviceTicketId)
Validate service ticket assertion.
|
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)
request - the requestbinder - the binderpublic 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 void prepareForTicketValidation(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 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 org.apereo.cas.validation.Assertion validateServiceTicket(org.apereo.cas.authentication.principal.WebApplicationService service,
java.lang.String serviceTicketId)
service - 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 void enforceTicketValidationAuthorizationFor(javax.servlet.http.HttpServletRequest request,
org.apereo.cas.authentication.principal.Service service,
org.apereo.cas.validation.Assertion assertion)
request - the requestservice - the serviceassertion - 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 org.springframework.web.servlet.View getSuccessView()
public org.springframework.web.servlet.View getFailureView()
public void addValidationSpecification(org.apereo.cas.validation.CasProtocolValidationSpecification validationSpecification)
validationSpecification - the validation specification