Search in sources :

Example 1 with ResponseBuilder

use of org.apereo.cas.authentication.principal.ResponseBuilder in project cas by apereo.

the class RedirectToServiceAction method doExecute.

@Override
protected Event doExecute(final RequestContext requestContext) {
    final WebApplicationService service = WebUtils.getService(requestContext);
    LOGGER.debug("Located service [{}] from the context", service);
    final Authentication auth = WebUtils.getAuthentication(requestContext);
    LOGGER.debug("Located authentication [{}] from the context", auth);
    final String serviceTicketId = WebUtils.getServiceTicketFromRequestScope(requestContext);
    LOGGER.debug("Located service ticket [{}] from the context", serviceTicketId);
    final ResponseBuilder builder = responseBuilderLocator.locate(service);
    LOGGER.debug("Located service response builder [{}] for [{}]", builder, service);
    final Response response = builder.build(service, serviceTicketId, auth);
    LOGGER.debug("Built response [{}] for [{}]", response, service);
    return finalizeResponseEvent(requestContext, service, response);
}
Also used : Response(org.apereo.cas.authentication.principal.Response) WebApplicationService(org.apereo.cas.authentication.principal.WebApplicationService) Authentication(org.apereo.cas.authentication.Authentication) ResponseBuilder(org.apereo.cas.authentication.principal.ResponseBuilder)

Aggregations

Authentication (org.apereo.cas.authentication.Authentication)1 Response (org.apereo.cas.authentication.principal.Response)1 ResponseBuilder (org.apereo.cas.authentication.principal.ResponseBuilder)1 WebApplicationService (org.apereo.cas.authentication.principal.WebApplicationService)1