@PostMapping(path = SamlIdPConstants.ENDPOINT_SAML2_SSO_PROFILE_CALLBACK)
    @Operation(summary = "Handle SAML2 SSO Callback Profile Request")
    protected ModelAndView handleCallbackProfileRequestPost(final HttpServletResponse response,
                                                            final HttpServletRequest request) throws Throwable {
        autoConfigureCookiePath(request);
        val properties = configurationContext.getCasProperties();
        val type = properties.getAuthn().getSamlIdp().getCore().getSessionStorageType();
        if (type.isBrowserStorage()) {
            val storage = WebUtils.getBrowserStoragePayload(request);
            if (storage.isPresent()) {
                val context = new JEEContext(request, response);
                configurationContext.getSessionStore().buildFromTrackableSession(context, storage.get());
                return handleProfileRequest(response, request);
            }
        }
        return WebUtils.produceErrorView(new IllegalArgumentException("Unable to build SAML response"));
    }
Handle callback profile request.

@param response the response
@param request  the request
@return the model and view
@throws Exception the exception
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/sso/SSOSamlIdPProfileCallbackHandlerController.java