-
Notifications
You must be signed in to change notification settings - Fork 8
/
login_success.html
39 lines (34 loc) · 1.12 KB
/
login_success.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="../../../../../mga/sps/mga/user/mgmt/html/device/fidoLoginHelper.js"></script>
<title>Post Login Processing</title>
<script type="text/javascript">
function onLoadPage() {
ac = getAmbientCredentials();
// successful authentication, remember this as lastUser
ac.username = htmlDecode("%USERNAME%");
storeAmbientCredentials();
// Pick up the remember-session token and store it, then
// redirect to the originally requested resource.
let token = "%HTTPRSPHDR{whoami}%";
if (token != null && token != "" && token != "Unknown") {
ac.whoami = token;
storeAmbientCredentials();
} else {
console.log("Unable to locate authentication token.");
}
let authURL = "%AUTH_URL%";
if (authURL == null || authURL == "none") {
authURL = getBaseURL();
}
// now redirect to authUrl
console.log("Redirecting to: " + authURL);
window.location.replace(authURL);
}
</script>
</head>
<body onload="onLoadPage()">
</body>
</html>