davide.cucurnia@vola.it
2024-02-07 68b84d1f652aae4644c2dde96d9bb99e358294e8
commit | author | age
9f6455 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
DC 2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it" lang="it">
3 <head>
4     <script src="{{asset('js/jquery/jquery-3.6.0.min.js')}}"></script>
5     <link href="{{asset('css/login.css?v=4')}}" rel="stylesheet" type="text/css">
6     <style type="text/css">
7         .c-half {
8             width: 50%;
9             float: left;
10             height: auto;
11         }
12
13         .c-box {
14             border: 1px solid black;
15             padding: 20px;
16             margin-bottom: 30px;
17         }
18
19         .grid {
20             padding: 50px 0px;
21         }
22         .vfa-red-title {
23             color: #e60000;
24             font-family: vodafone_ltregular, Arial, Helvetica, sans-serif;
25             font-size: 40px;
26             font-weight: normal;
27             text-align: center;
28             margin-bottom: 26px;
29             margin-top: 26px;
30             line-height: 42px;
31         }
55f8f9 32
DC 33         a {
34             text-decoration:underline;
35             display: block;
36         }
37
9f6455 38     </style>
DC 39 </head>
40
41 <body class="page_gray">
42
43 <div class="page_centerer">
44
45     <div class="grid">
46
55f8f9 47         <h1 class="vfa-red-title">Standalone FakeSSO Server</h1>
9f6455 48
DC 49         <form id="fakesso" name="fakesso" action="" method="POST">
50             @csrf
51             <div class="c-box">
d2e4b7 52                 <h2>Seleziona il profilo SSO su cui vuoi loggarti</h2>
55f8f9 53                 <p>Il login utilizza i cookie a livello di dominio, risulterai loggato su tutti i portali che utilizzano il dominio attuale ({{$domain}}).</p>
9f6455 54                 <select id="sel_attiva">
DC 55                     @foreach (config('devtools.fake_sso_profiles') as $profileIndex => $profileContent)
56                         <option value="{{$profileIndex}}">{{$profileContent['name']}}</option>
57                     @endforeach
58                 </select>
59                 <input type="button" value="Attiva" id="btnAttiva"/>
60                 <div class="c-half"></div>
61             </div>
62             <div class="c-box">
d2e4b7 63                 <p>Elimina dalla sessione i cookie FakeSSO.</p>
9f6455 64                 <input type="button" value="Reset" id="btnReset"/>
DC 65
66             </div>
67         </form>
68         <div class="c-box">
d2e4b7 69             <a href="{{route('create-view')}}">Crea nuovo profilo sso</a>
DC 70         </div>
71         <div class="c-box">
72             <h2>Scorciatoie Portali</h2>
73             @foreach (config('custom.portals_shortcuts',[]) as $websiteName => $websiteUri)
55f8f9 74                 <a href="{{$websiteUri}}" target="_blank">{{$websiteName}}</a>
d2e4b7 75             @endforeach
9f6455 76         </div>
DC 77     </div>
78 </div>
79
80 <script type="text/javascript">
81     jQuery(document).ready(function () {
82         let authorizationToken = $('input[name="_token"]').val();
83
84         document.getElementById("btnAttiva").onclick = setCookies;
85         document.getElementById("btnReset").onclick = delCookies;
86
b682c5 87         function callAjax(url) {
9f6455 88             document.getElementById('vola-loading').style.display = 'block';
DC 89             let profile = document.getElementById('sel_attiva').value;
90             $.ajax({
91                 headers: {
92                     'X-CSRF-TOKEN': authorizationToken,
93                 },
94                 type: "POST",
95                 url: url,
96                 dataType: "json",
97                 data: JSON.stringify({prof: profile}),
98             }).done(function (msg) {
99                 document.getElementById('vola-loading').style.display = 'none';
100             }).fail(function() {
101                 document.getElementById('vola-loading').style.display = 'none';
102             });
103         }
104
105         function setCookies() {
106             let setUri = location.origin + "{{$setUrl}}";
107             callAjax(setUri);
108         }
109
110         function delCookies() {
111             let logoutUri = location.origin + "{{$clearUrl}}";
112             callAjax(logoutUri);
113         }
114
115     });
116 </script>
117
118 @include('vola_loading_animation')
119 </body>
120 </html>