blob: ee296807ed142cf8df7cd7cb3c56c751924d5019 (
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>
|