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 |
height: 80px;; |
|
18 |
} |
|
19 |
|
|
20 |
.grid { |
|
21 |
padding: 50px 0px; |
|
22 |
} |
|
23 |
.vfa-red-title { |
|
24 |
color: #e60000; |
|
25 |
font-family: vodafone_ltregular, Arial, Helvetica, sans-serif; |
|
26 |
font-size: 40px; |
|
27 |
font-weight: normal; |
|
28 |
text-align: center; |
|
29 |
margin-bottom: 26px; |
|
30 |
margin-top: 26px; |
|
31 |
line-height: 42px; |
|
32 |
} |
|
33 |
</style> |
|
34 |
</head> |
|
35 |
|
|
36 |
<body class="page_gray"> |
|
37 |
|
|
38 |
<div class="page_centerer"> |
|
39 |
|
|
40 |
<div class="grid"> |
|
41 |
|
|
42 |
<h1 class="vfa-red-title">Laravel FakeSSO</h1> |
|
43 |
|
|
44 |
<form id="fakesso" name="fakesso" action="" method="POST"> |
|
45 |
@csrf |
|
46 |
<div class="c-box"> |
|
47 |
<p> |
|
48 |
Seleziona la sessione di SSO e attivala |
|
49 |
</p> |
|
50 |
<select id="sel_attiva"> |
|
51 |
@foreach (config('devtools.fake_sso_profiles') as $profileIndex => $profileContent) |
|
52 |
<option value="{{$profileIndex}}">{{$profileContent['name']}}</option> |
|
53 |
@endforeach |
|
54 |
</select> |
|
55 |
<input type="button" value="Attiva" id="btnAttiva"/> |
|
56 |
<div class="c-half"></div> |
|
57 |
</div> |
|
58 |
<div class="c-box"> |
|
59 |
<p> |
|
60 |
Elimina dalla sessione la FakeSSO. |
|
61 |
</p> |
|
62 |
<input type="button" value="Reset" id="btnReset"/> |
|
63 |
|
|
64 |
</div> |
|
65 |
</form> |
|
66 |
<div class="c-box"> |
|
67 |
<a href="{{route('create-view')}}"> |
|
68 |
Crea nuovo profilo sso |
|
69 |
</a> |
|
70 |
</div> |
|
71 |
</div> |
|
72 |
</div> |
|
73 |
|
|
74 |
<script type="text/javascript"> |
|
75 |
jQuery(document).ready(function () { |
|
76 |
let authorizationToken = $('input[name="_token"]').val(); |
|
77 |
|
|
78 |
document.getElementById("btnAttiva").onclick = setCookies; |
|
79 |
document.getElementById("btnReset").onclick = delCookies; |
|
80 |
|
|
81 |
function callAjax(url, withReload = true) { |
|
82 |
document.getElementById('vola-loading').style.display = 'block'; |
|
83 |
let profile = document.getElementById('sel_attiva').value; |
|
84 |
$.ajax({ |
|
85 |
headers: { |
|
86 |
'X-CSRF-TOKEN': authorizationToken, |
|
87 |
}, |
|
88 |
type: "POST", |
|
89 |
url: url, |
|
90 |
dataType: "json", |
|
91 |
data: JSON.stringify({prof: profile}), |
|
92 |
}).done(function (msg) { |
|
93 |
document.getElementById('vola-loading').style.display = 'none'; |
|
94 |
if (withReload) { |
|
95 |
location.href = location.origin + "/get"; |
|
96 |
} |
|
97 |
}).fail(function() { |
|
98 |
document.getElementById('vola-loading').style.display = 'none'; |
|
99 |
location.href = location.origin + "/get"; |
|
100 |
}); |
|
101 |
} |
|
102 |
|
|
103 |
function setCookies() { |
|
104 |
let setUri = location.origin + "{{$setUrl}}"; |
|
105 |
callAjax(setUri); |
|
106 |
} |
|
107 |
|
|
108 |
function delCookies() { |
|
109 |
let logoutUri = location.origin + "{{$clearUrl}}"; |
|
110 |
callAjax(logoutUri); |
|
111 |
} |
|
112 |
|
|
113 |
}); |
|
114 |
</script> |
|
115 |
|
|
116 |
@include('vola_loading_animation') |
|
117 |
</body> |
|
118 |
</html> |