blob: 0ffab1af598e96edbde18f32a32861b5ea844308 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
<script>
// Set authentication info
window.addEventListener("message", function(evt) {
var port = evt.ports[0];
document.cookie = 'cookie=' + evt.data.cookie;
var xhr = new XMLHttpRequest();
xhr.addEventListener('load', function() {
port.postMessage({msg: 'LOGIN FINISHED'});
}, false);
xhr.open('GET',
'./fetch-access-control.py?Auth',
true,
evt.data.username, evt.data.password);
xhr.send();
}, false);
</script>
|