@Override
    protected void prepareResponse(final Response response, final Map<String, Object> model) {
        val service = getAssertionFrom(model).getService();
        val authentication = getPrimaryAuthenticationFrom(model);
        val principal = getPrincipal(model);
        val registeredService = servicesManager.findServiceBy(service);
        val authnAttributes = getCasProtocolAuthenticationAttributes(model, registeredService);
        val principalAttributes = getPrincipalAttributesAsMultiValuedAttributes(model);
        samlResponseBuilder.prepareSuccessfulResponse(model, response, service, authentication,
            principal, authnAttributes, principalAttributes);
    }
Implementation of a view to return a SAML SOAP response and assertion, based on
the SAML 1.1 specification.
<p>
If an AttributePrincipal is supplied, then the assertion will include the
attributes from it (assuming a String key/Object value pair). The only
Authentication attribute it will look at is the authMethod (if supplied).
<p>
Note that this class will currently not handle proxy authentication.

@author Scott Battaglia
@author Marvin S. Addison
@since 3.1
support/cas-server-support-saml/src/main/java/org/apereo/cas/support/saml/web/view/Saml10SuccessResponseView.java