-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
82 lines (78 loc) · 4.83 KB
/
index.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html lang="en">
<head>
<title>Click to dial</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<style>
body {
font: 20px Montserrat, sans-serif;
line-height: 1.8;
color: #f5f6f7;
}
p {font-size: 16px;}
.margin {margin-bottom: 45px;}
.bg-1 {
background-color: #f54029; /* Warm Red */
color: #ffffff;
}
.bg-2 {
background-color: #36454f; /* Charcoal */
color: #ffffff;
}
.bg-3 {
background-color: #ffffff; /* White */
color: #555555;
}
.bg-4 {
background-color: #2f2f2f; /* Black Gray */
color: #fff;
}
.container-fluid {
padding-top: 70px;
padding-bottom: 70px;
}
.navbar {
padding-top: 15px;
padding-bottom: 15px;
border: 0;
border-radius: 0;
margin-bottom: 0;
font-size: 12px;
letter-spacing: 5px;
}
.navbar-nav li a:hover {
color: #1abc9c !important;
}
.phoneicon{
width: 40px; /* Set width of icon */
height: 40px; /* Set height of icon */
}
</style>
</head>
<body>
<!-- Navbar -->
<nav class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#">Speed Dial</a>
</div>
</div>
</nav>
<!-- First Container -->
<div class="container-fluid bg-2 text-center">
<h3>*GSD*</h3> <a class="lgscreenphone phonelink" href="tel:+13174934357"><img class="phoneicon" src="https://freeiconshop.com/wp-content/uploads/edd/phone-flat.png"></a>
</div>
<!-- Second Container -->
<div class="container-fluid bg-2 text-center">
<h3>NOC</h3> <a class="lgscreenphone phonelink" href="tel:+13177158665"><img class="phoneicon" src="https://freeiconshop.com/wp-content/uploads/edd/phone-flat.png"></a>
</div>
<!-- ChatBot --> <div><script src=https://global.oktacdn.com/okta-auth-js/5.2.2/okta-auth-js.min.js type="text/javascript"></script> <script type="text/javascript"> var authClient = new OktaAuth({ redirectUri: 'https://genesys.service-now.com/esc', postLogoutRedirectUri: 'https://genesys.service-now.com/login.do', clientId: '0oa1rmibafepMBGvm0h8', issuer: 'https://genesys.okta.com/oauth2/default', pkce: false, responseType: 'code', }); const QueryString = window.location.search; const urlParams = new URLSearchParams(QueryString); if (urlParams.has('code')) { //console.log('OTT: ' + urlParams.get('code')); localStorage.setItem('myOTToken', urlParams.get('code')); localStorage.setItem('redirectUri', 'https://genesys.service-now.com/esc'); localStorage.setItem('g-nonce', document.cookie.split('; ').find(row => row.startsWith('okta-oauth-nonce')).split('=')[1]); } else { //console.log('no-code found!'); } function login() {
authClient.setOriginalUri(); authClient.signInWithRedirect(); } function logout() { Genesys("command", "Auth.logout", {}, function(){ localStorage.removeItem('myOTToken'); authClient.signOut(); console.log('User signed out.'); }); } </script> <script> (function (g, e, n, es, ys) { g['_genesysJs'] = e; g[e] = g[e] || function () { (g[e].q = g[e].q || []).push(arguments) }; g[e].t = 1 * new Date(); g[e].c = es; ys = document.createElement('script'); ys.async = 1; ys.src = n; ys.charset = 'utf-8'; document.head.appendChild(ys); })(window, 'Genesys', 'https://apps.mypurecloud.com/genesys-bootstrap/genesys.min.js', { environment: 'prod', deploymentId: 'a0566791-5e9b-4aaf-836a-5a98ab6dd612', debug: false }); </script> <script async defer> Genesys("registerPlugin", "AuthProvider", function(AuthProvider){ AuthProvider.registerCommand("getAuthCode", function(e){ console.log("Is OTT code ready?? " + localStorage.getItem('myOTToken')); console.log("Already Authenticated."); e.resolve({ authCode: localStorage.getItem('myOTToken'), redirectUri: localStorage.getItem('redirectUri'), nonce: localStorage.getItem('g-nonce') }); });
AuthProvider.subscribe("Auth.authError", function(e) { // This event is published when we do not receive authCode from your AuthProvider.getAuthCode command. Add your logic here to ensure the command resolves properly with the required data. console.log("Not Authenticated, Logging In."); login(); }); AuthProvider.registerCommand('reAuthenticate', function(e) { // This command will be called when current authorization code and/or refresh token is expired. console.log("Authentication Expired, Logging In."); login(); e.resolve({ authCode: localStorage.getItem('myIdToken'), redirectUri: localStorage.getItem('redirectUri'), nonce: localStorage.getItem('g-nonce') }); }); AuthProvider.ready(); }); </script></div>
</body>
</html>