Filippo Bertilotti
2024-07-15 488dbe0a4f0d5be738a5ac010d19a94ce45f20a2
app/Http/Controllers/Profiles/ProfilesController.php
@@ -24,6 +24,7 @@
        if ($this->authorized) {
            return view('vodafone_fake_sso.choose_profile', [
                "domain" => Utils::getDomain($_SERVER['SERVER_NAME']),
                "loggedInfo" => Utils::getLoggedUser($request),
                "setUrl" => "/set",
                "clearUrl" => "/clear"
            ]);
@@ -32,7 +33,6 @@
    public function setFakeSSO(Request $request)
    {
        \Log::channel('sso')->debug("Attivo la sessione FakeSSO");
        if ($this->authorized) {
            $json = $request->json()->all();
            $expire = time() + (60 * 30);
@@ -50,7 +50,6 @@
    public function clearFakeSSO(Request $request)
    {
        \Log::channel('sso')->debug("Rimuovo la sessione FakeSSO");
        $domain = Utils::getDomain($_SERVER['SERVER_NAME']);
        if ($this->authorized) {
            @setcookie('mc_FakeSSO', "", -1, "/", $domain);
@@ -67,13 +66,17 @@
    {
        $defaultXML = \Arr::first(config('devtools.fake_sso_profiles'));
        $data = [
            "sso_getWebcustomerInformation" => \Arr::first($defaultXML["sso"]["getWebcustomerInformation"]["parametri"]["t"]),
            "sso_getMSISDNDetails" => \Arr::first($defaultXML["sso"]["getMSISDNDetails"]["parametri"]["t"]),
            "sso_getMSISDNList" => \Arr::first($defaultXML["sso"]["getMSISDNList"]["parametri"]["t"]),
            "sso_getWebcustomerInformation" => \Arr::first($defaultXML["sso"]["getWebcustomerInformation"]["parametri"]["k"]),
            "sso_getMSISDNDetails" => \Arr::first($defaultXML["sso"]["getMSISDNDetails"]["parametri"]["k"]),
            "sso_getMSISDNList" => \Arr::first($defaultXML["sso"]["getMSISDNList"]["parametri"]["k"]),
            "sso_getSelectedMSISDNDetails" => \Arr::first($defaultXML["sso"]["getSelectedMSISDNDetails"]["parametri"]["ms"]),
            "sso_getInfoActivationWSC" => \Arr::first($defaultXML["sso"]["getInfoActivationWSC"]["parametri"]["boID"]),
            "picasso_getWebcustomerInformation" => \Arr::first($defaultXML["picasso"]["getWebcustomerInformation"]["parametri"]["t"]),
            "picasso_getWebcustomerInformation" => \Arr::first($defaultXML["picasso"]["getWebcustomerInformation"]["parametri"]["k"]),
        ];
        return view('vodafone_fake_sso.create-view', $data);
    }
    public function saveUser() {
        return view("welcome");
    }
}