VolaFakeSSO = new VolaFakeHTTPResponder(); $this->headers = [ "Content-Type" => 'text/xml', ]; if (config('custom.compressed_responses',false) === TRUE) { $this->headers['content-encoding'] = 'gzip'; } } public function modelBasedRequest(Request $request) { $this->logReceivedRequest($request); $picassoRequest = (str_starts_with($request->getRequestUri(), '/picasso/',)); $profile = Utils::getRequestedUser($request); if (isset($profile)) { $responseContent = $this->VolaFakeSSO->getModelBasedResponses($request, $profile, $picassoRequest); $this->logProcessedRequest($request, $responseContent, (($picassoRequest) ? "SSO v2 Legacy" : "SSO v2 Picasso")); $responseContent = $this->compressIfRequested($request, $responseContent); return response($responseContent, 200, $this->headers); } else { $this->logRejectedRequest($request); return response('No cookie, no logged', 400, $this->headers); } } public function manageLegacyRequest(Request $request) { $this->logReceivedRequest($request); $picassoRequest = (str_starts_with($request->getRequestUri(), '/picasso/',)); $profile = Utils::getRequestedUser($request); if (isset($profile)) { $responseContent = $this->VolaFakeSSO->getResponses($request, $profile, $picassoRequest); $this->logProcessedRequest($request, $responseContent, (($picassoRequest) ? "SSO Legacy" : "SSO Picasso")); $responseContent = $this->compressIfRequested($request, $responseContent); return response($responseContent, 200, $this->headers); } else { $this->logRejectedRequest($request); return response('No cookie, no logged', 400, $this->headers); } } }