-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dynamo_Client_Store_web_store.war_shared_js_ccLibs_cc-oauth-timeout.js.html
executable file
·461 lines (386 loc) · 22.4 KB
/
Dynamo_Client_Store_web_store.war_shared_js_ccLibs_cc-oauth-timeout.js.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: Dynamo/Client/Store/web/store.war/shared/js/ccLibs/cc-oauth-timeout.js</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Source: Dynamo/Client/Store/web/store.war/shared/js/ccLibs/cc-oauth-timeout.js</h1>
<section>
<article>
<pre class="prettyprint source"><code>//----------------------------------------
/**
* @fileoverview This library handles the OAuth token refresh
*
* The CCOAuthTimeout object is instantiated with a reference to the
* ccRestClient object. This is used to obtain info on logged in status,
* the profile type (Admin, Storefront or Layout Preview) and whether a
* recent server side request has been made.
*
* For Admin, event handlers are attached to the html tag which record
* user activity - clicks or keypresses.
*
* Every 30 seconds, we check for recent activity, and if so, refresh the
* OAuth token. On Storefront, we only check for server side activity,
* for Admin, we take keyboard and mouse activity into account too.
*
* In Admin, a warning is displayed if the session will timeout within
* the next two minutes. Clicking OK on this warning will cause a token
* refresh immediately
*
*
*
*/
define(
['ccConstants',
'jquery',
'pubsub',
'notifications',
'CCi18n'],
function(CCConstants, $, pubSub, notifications, CCi18n) {
'use strict';
/**
* Constructor for CCOAuthTimeout object
*
* @param {ccRestClient} ccRestClient - the admin or storefront REST client
* @name CCOAuthTimeout
* @class Handles the OAuth token refresh timers and timeout warning.
* @private
*/
function CCOAuthTimeout(ccRestClient) {
/**
* @private
* @var {boolean} recentUserActivity Flag to record recent client side activity
* @var {number} storeRefreshIntervalId timeout id for token refresh interval
* @var {number} logoutWarningTimerId timeout id for session expire warning message
* @var {number} expireSessionTimerId timeout id for session expire
* @var {Object} $focusedElement jquery object of most recently focused element
*/
var recentUserActivity = false,
storeRefreshIntervalId = null,
logoutWarningTimerId = null,
expireSessionTimerId = null,
$focusedElement = null;
/**
* @private
* @constant {string} ALERT_ID_WARN Id of the div holding the 'your session is about to timeout' warning
* @constant {string} ALERT_ID_LOGOUT Id of the div holding the 'you have been logged out' message
*/
var ALERT_ID_WARN = 'cc-warn-session-timeout-alert',
ALERT_ID_LOGOUT = 'cc-expire-session-alert';
/**
* This method is called if the token successfully refreshed here or in another window.
* @private
* @function ccOAuthTimeout#handleTokenRefreshedSuccess
*/
var handleTokenRefreshedSuccess = function() {
$.Topic(pubSub.topicNames.USER_SESSION_VALID).publish();
ccRestClient.storeRequestWasMade = false;
recentUserActivity = false;
resetTimeoutWarning();
}
/**
* This method is called to refresh the token in specific intervals
* @private
* @function ccOAuthTimeout#doRefreshToken
*/
var doRefreshToken = function() {
var errorFunc = function(pResult) {};
if (ccRestClient.loggedIn && (recentUserActivity || ccRestClient.storeRequestWasMade)) {
ccRestClient.refresh(handleTokenRefreshedSuccess, errorFunc);
}
};
/**
* This method is called to register the timer to refresh the token
* @private
* @function ccOAuthTimeout#setRefreshInterval
*/
var setRefreshInterval = function() {
if(ccRestClient.loggedIn && storeRefreshIntervalId == null) {
storeRefreshIntervalId = setInterval(doRefreshToken, CCConstants.TOKEN_REFRESH_INTERVAL);
}
};
/**
* This method is called to clear the timer to refresh the token
* @private
* @function ccOAuthTimeout#clearRefreshInterval
*/
var clearRefreshInterval = function() {
if (storeRefreshIntervalId) {
clearInterval(storeRefreshIntervalId);
storeRefreshIntervalId = null;
}
};
/**
* Admin only - Capture the current element if we're about to display the warning message.
* If we're inside the storefront iframe, handle that scenario correctly.
* @private
* @function ccOAuthTimeout#captureFocusedElement
*/
var captureFocusedElement = function() {
$focusedElement = $(document.activeElement);
if ($focusedElement.is('iframe')) {
try {
$focusedElement = $(document.activeElement.contentWindow.document.activeElement);
} catch(e) { }
}
}
/**
* Admin only - display warning if user login session is about to timeout
* @private
* @function ccOAuthTimeout#warnSessionTimeout
*/
var warnSessionTimeout = function() {
// Display session timeout warning. Only applies to admin profile.
// Don't display if another warning on screen.
//
if (ccRestClient.profileType == CCConstants.PROFILE_TYPE_ADMIN && $('.cc-notification').length == 0) {
captureFocusedElement();
notifications.notify([
{
style: 'inline',
id: '#cc-message-center',
customNotificationID: ALERT_ID_WARN,
status: 'confirm',
curtain: true,
close: false,
fade: false,
header: CCi18n.t('ns.common:resources.sessionTimeoutHeader'),
message: CCi18n.t('ns.common:resources.sessionTimeoutMessage'),
actionOptions: [{
actionOption1: [{
text: CCi18n.t('ns.common:resources.okText'),
action: '',
classes: 'btn cc-submit-changes-btn cc-btn-primary'
}]
}]
}
]);
// OK refreshes token immediately. Also need to handle notification's
// 'onclick' attribute, and ensure we kill the expiry message timer
//
$('button', '#' + ALERT_ID_WARN).each(function() {
var clickHandler = this.onclick.bind(this);
$(this).prop('onclick', null).on('click', function() {
clearExpireTimeout();
doRefreshToken();
if ($focusedElement) { $focusedElement.focus(); }
if (clickHandler instanceof Function) { clickHandler(); }
});
});
// Handle clicks outside the window
//
$('#' + ALERT_ID_WARN).closest('div.cc-notification-outer').
next('div.cc-curtain').on('click', function() {
$('button', '#' + ALERT_ID_WARN).focus();
});
// Setup timer to display Session Expired message
//
setExpireTimeout();
}
};
/**
* Admin only - utility function to hide the session timeout warning,
* along with its associated modal divs.
* @private
* @function ccOAuthTimeout#warnSessionTimeout
*/
var hideSessionTimeout = function() {
$('#' + ALERT_ID_WARN).
closest('div.cc-notification-outer').
next('div.cc-curtain').
andSelf().remove();
}
/**
* Admin only - display message if user session times out
* @private
* @function ccOAuthTimeout#expireSessionMessage
*/
var expireSessionMessage = function() {
// Expire session message displayed once timeout reached. Only applies to
// admin profile. Don't display if previous warning not on screen.
//
if (ccRestClient.profileType == CCConstants.PROFILE_TYPE_ADMIN && $('#' + ALERT_ID_WARN).length) {
hideSessionTimeout();
notifications.notify([
{
style: 'inline',
id: '#cc-message-center',
customNotificationID: ALERT_ID_LOGOUT,
status: 'confirm',
curtain: true,
close: false,
fade: false,
header: CCi18n.t('ns.common:resources.sessionExpiryHeader'),
message: CCi18n.t('ns.common:resources.sessionExpiryMessage'),
actionOptions: [{
actionOption1: [{
text: CCi18n.t('ns.common:resources.okText'),
action: '',
classes: 'btn cc-submit-changes-btn cc-btn-primary'
}]
}]
}
]);
// 'OK' forces logout
//
$('button', '#' + ALERT_ID_LOGOUT).each(function() {
$(this).prop('onclick', null).on('click', function() {
var redirectBound = ccRestClient.redirectToAdminLoginScreen.bind(ccRestClient);
ccRestClient.logout(redirectBound, redirectBound);
});
});
// Handle clicks outside the window
//
$('#' + ALERT_ID_LOGOUT).closest('div.cc-notification-outer').
next('div.cc-curtain').on('click', function() {
$('button', '#' + ALERT_ID_LOGOUT).focus();
});
}
};
/**
* This method is called to set the timer to display the timeout warning
* @private
* @function ccOAuthTimeout#resetTimeoutWarning
*/
var resetTimeoutWarning = function() {
if (ccRestClient.profileType == CCConstants.PROFILE_TYPE_ADMIN) {
clearTimeoutWarning();
logoutWarningTimerId = setTimeout(warnSessionTimeout, CCConstants.TOKEN_WARNING_TIMEOUT);
}
};
/**
* This method is called to clear the timer to display the timeout warning
* @private
* @function ccOAuthTimeout#clearTimeoutWarning
*/
var clearTimeoutWarning = function() {
if (logoutWarningTimerId) {
clearTimeout(logoutWarningTimerId);
logoutWarningTimerId = null;
}
};
/**
* This method is called to set the timer to display the session expired message
* @private
* @function ccOAuthTimeout#setExpireTimeout
*/
var setExpireTimeout = function() {
if (ccRestClient.profileType == CCConstants.PROFILE_TYPE_ADMIN) {
clearExpireTimeout();
expireSessionTimerId = setTimeout(expireSessionMessage, CCConstants.TOKEN_EXPIRED_MESSAGE_TIMEOUT);
}
}
/**
* This method is called to clear the timer to display the session expired message
* @private
* @function ccOAuthTimeout#clearExpireTimeout
*/
var clearExpireTimeout = function() {
if (expireSessionTimerId) {
clearTimeout(expireSessionTimerId);
expireSessionTimerId = null;
}
}
/**
* Setup for callback timers, and add event handler to html tag. Called
* on rest client initialization, and also on subsequent login / register
* @private
* @function ccOAuthTimeout#setupRefreshTimers
*/
var setupRefreshTimers = function() {
// Clear existing event handlers
$('html').off('.cctimer');
if (ccRestClient.loggedIn) {
// We want this for Admin, Layout Preview and Storefront
setRefreshInterval();
// Add event handlers for mousup, keyup
// If we're in Admin, then record the activity
// If we're in Layout Preview, then trigger event in parent window.
if (ccRestClient.profileType == CCConstants.PROFILE_TYPE_ADMIN) {
// Start the warning timer - just for admin
resetTimeoutWarning();
// Add event handlers to window
$('html').on("keyup.cctimer mouseup.cctimer", function() {
recentUserActivity = true;
});
// $('html').keypress("q", function(e) { if (e.ctrlKey) { warnSessionTimeout(); } });
// Handle refresh in other window
ccRestClient.registerLoginUpdateCallback(function() {
clearExpireTimeout();
hideSessionTimeout();
handleTokenRefreshedSuccess();
});
// Handle auto logout in other window
// Just don't leave a 'you have been logged out' message up.
ccRestClient.registerLogoutUpdateCallback(function() {
$('button', '#' + ALERT_ID_LOGOUT).trigger('click');
});
} else if (ccRestClient.profileType == CCConstants.PROFILE_TYPE_LAYOUT_PREVIEW) {
// If we're in Layout Preview, then trigger event in parent window.
if (parent.$) {
$('html').on("keyup.cctimer mouseup.cctimer", function(e) {
parent.$('html', parent.document).trigger(e);
});
}
}
}
};
/**
* Remove event handlers and stop timers on logout
* @private
* @function ccOAuthTimeout#tearDownRefreshTimers
*/
var tearDownRefreshTimers = function() {
clearRefreshInterval();
clearTimeoutWarning();
clearExpireTimeout();
$('html').off(".cctimer");
};
// Registering this as an init callback, in case we arrive here for the first time already logged in
ccRestClient.registerInitCallback(setupRefreshTimers);
// Admin: setup on login tear down on logout or session expiry
$.Topic(pubSub.topicNames.AUTH_LOGIN_SUCCCESS).subscribe(setupRefreshTimers);
$.Topic(pubSub.topicNames.AUTH_LOGOUT_SUCCESS).subscribe(tearDownRefreshTimers);
// Storefront / preview: setup on login or register, tear down on logout or session expiry
$.Topic(pubSub.topicNames.USER_LOGIN_SUCCESSFUL).subscribe(setupRefreshTimers);
$.Topic(pubSub.topicNames.USER_AUTO_LOGIN_SUCCESSFUL).subscribe(setupRefreshTimers);
$.Topic(pubSub.topicNames.USER_LOGOUT_SUCCESSFUL).subscribe(tearDownRefreshTimers);
$.Topic(pubSub.topicNames.USER_SESSION_EXPIRED).subscribe(tearDownRefreshTimers);
// Layout preview doesn't try to login, so we have to wait for PAGE_READY instead.
if (ccRestClient.profileType == CCConstants.PROFILE_TYPE_LAYOUT_PREVIEW) {
$.Topic(pubSub.topicNames.PAGE_READY).subscribe(setupRefreshTimers);
}
}
return CCOAuthTimeout;
});
</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-ccKoErrorWrapper.html">ccKoErrorWrapper</a></li><li><a href="module-ccKoExtensions.html">ccKoExtensions</a></li></ul><h3>Classes</h3><ul><li><a href="Address.html">Address</a></li><li><a href="CartViewModel.html">CartViewModel</a></li><li><a href="DynamicProperty.html">DynamicProperty</a></li><li><a href="EventDispatcher.html">EventDispatcher</a></li><li><a href="GiftCardViewModel.html">GiftCardViewModel</a></li><li><a href="GiftProductListingViewModel.html">GiftProductListingViewModel</a></li><li><a href="ko.bindingHandlers.background.html">background</a></li><li><a href="ko.bindingHandlers.carouselSwipe.html">carouselSwipe</a></li><li><a href="ko.bindingHandlers.ccForm.html">ccForm</a></li><li><a href="ko.bindingHandlers.ccLink.html">ccLink</a></li><li><a href="ko.bindingHandlers.ccValidation.html">ccValidation</a></li><li><a href="ko.bindingHandlers.checkbox.html">checkbox</a></li><li><a href="ko.bindingHandlers.chosen.html">chosen</a></li><li><a href="ko.bindingHandlers.contextResourcesNamespace.html">contextResourcesNamespace</a></li><li><a href="ko.bindingHandlers.currency.html">currency</a></li><li><a href="ko.bindingHandlers.datepicker.html">datepicker</a></li><li><a href="ko.bindingHandlers.datepopover.html">datepopover</a></li><li><a href="ko.bindingHandlers.draggable.html">draggable</a></li><li><a href="ko.bindingHandlers.droppable.html">droppable</a></li><li><a href="ko.bindingHandlers.fade.html">fade</a></li><li><a href="ko.bindingHandlers.hover.html">hover</a></li><li><a href="ko.bindingHandlers.imageSource.html">imageSource</a></li><li><a href="ko.bindingHandlers.imageZoom.html">imageZoom</a></li><li><a href="ko.bindingHandlers.localeText.html">localeText</a></li><li><a href="ko.bindingHandlers.makeAccess.html">makeAccess</a></li><li><a href="ko.bindingHandlers.modal.html">modal</a></li><li><a href="ko.bindingHandlers.modalTabbingContraint.html">modalTabbingContraint</a></li><li><a href="ko.bindingHandlers.onRender.html">onRender</a></li><li><a href="ko.bindingHandlers.popeditor.html">popeditor</a></li><li><a href="ko.bindingHandlers.popover.html">popover</a></li><li><a href="ko.bindingHandlers.productImageSource.html">productImageSource</a></li><li><a href="ko.bindingHandlers.propertyEditor.html">propertyEditor</a></li><li><a href="ko.bindingHandlers.radio.html">radio</a></li><li><a href="ko.bindingHandlers.richTextEditor.html">richTextEditor</a></li><li><a href="ko.bindingHandlers.scrollAffix.html">scrollAffix</a></li><li><a href="ko.bindingHandlers.select2.html">select2</a></li><li><a href="ko.bindingHandlers.select2Tags.html">select2Tags</a></li><li><a href="ko.bindingHandlers.selectable.html">selectable</a></li><li><a href="ko.bindingHandlers.slickList.html">slickList</a></li><li><a href="ko.bindingHandlers.slide.html">slide</a></li><li><a href="ko.bindingHandlers.slider.html">slider</a></li><li><a href="ko.bindingHandlers.spectrum.html">spectrum</a></li><li><a href="ko.bindingHandlers.tagsInput.html">tagsInput</a></li><li><a href="ko.bindingHandlers.textCheck.html">textCheck</a></li><li><a href="ko.bindingHandlers.timepicker.html">timepicker</a></li><li><a href="ko.bindingHandlers.triggerMessage.html">triggerMessage</a></li><li><a href="ko.bindingHandlers.validatableTarget.html">validatableTarget</a></li><li><a href="ko.bindingHandlers.validatableValue.html">validatableValue</a></li><li><a href="ko.bindingHandlers.widgetLocaleText.html">widgetLocaleText</a></li><li><a href="koValidation.alphaNumeric.html">alphaNumeric</a></li><li><a href="koValidation.alphaNumericNoSpaces.html">alphaNumericNoSpaces</a></li><li><a href="koValidation.alphaNumericNoSpacesWithSeperators.html">alphaNumericNoSpacesWithSeperators</a></li><li><a href="koValidation.alphaNumericWithSeperators.html">alphaNumericWithSeperators</a></li><li><a href="koValidation.bool.html">bool</a></li><li><a href="koValidation.creditcard.html">creditcard</a></li><li><a href="koValidation.cvv.html">cvv</a></li><li><a href="koValidation.endmonth.html">endmonth</a></li><li><a href="koValidation.endyear.html">endyear</a></li><li><a href="koValidation.importFileName.html">importFileName</a></li><li><a href="koValidation.laterDate.html">laterDate</a></li><li><a href="koValidation.match.html">match</a></li><li><a href="koValidation.mediaZipFileName.html">mediaZipFileName</a></li><li><a href="koValidation.number.html">number</a></li><li><a href="koValidation.observablePattern.html">observablePattern</a></li><li><a href="koValidation.password.html">password</a></li><li><a href="koValidation.price.html">price</a></li><li><a href="koValidation.propertyIdAlreadyInUse.html">propertyIdAlreadyInUse</a></li><li><a href="koValidation.propertyNameAlreadyInUse.html">propertyNameAlreadyInUse</a></li><li><a href="koValidation.restrictSlashCharacters.html">restrictSlashCharacters</a></li><li><a href="koValidation.startmonth.html">startmonth</a></li><li><a href="koValidation.startyear.html">startyear</a></li><li><a href="koValidation.uniqueTrimmed.html">uniqueTrimmed</a></li><li><a href="koValidation.uniqueTrimmedCaseInsensitive.html">uniqueTrimmedCaseInsensitive</a></li><li><a href="koValidation.url.html">url</a></li><li><a href="module-ccKoExtensions-ko.bindingHandlers.addTemplate.html">addTemplate</a></li><li><a href="module-ccKoExtensions-ko.bindingHandlers.ccDate.html">ccDate</a></li><li><a href="module-ccKoExtensions-ko.bindingHandlers.ccDateTime.html">ccDateTime</a></li><li><a href="module-ccKoExtensions-ko.bindingHandlers.ccNumber.html">ccNumber</a></li><li><a href="module-ccKoExtensions-ko.bindingHandlers.disabled.html">disabled</a></li><li><a href="module-ccKoExtensions-ko.bindingHandlers.element.html">element</a></li><li><a href="module-ccKoExtensions-ko.bindingHandlers.embeddedAssistance.html">embeddedAssistance</a></li><li><a href="module-ccKoExtensions-ko.bindingHandlers.inTabFlow.html">inTabFlow</a></li><li><a href="module-ccKoExtensions-ko.bindingHandlers.setContextVariable.html">setContextVariable</a></li><li><a href="NavStateViewModel.html">NavStateViewModel</a></li><li><a href="OrderHistoryViewModel.html">OrderHistoryViewModel</a></li><li><a href="OrderViewModel.html">OrderViewModel</a></li><li><a href="ParentOrganisation.html">ParentOrganisation</a></li><li><a href="ProductListingSearchViewModel.html">ProductListingSearchViewModel</a></li><li><a href="ProductListingViewModel.html">ProductListingViewModel</a></li><li><a href="ProductViewModel.html">ProductViewModel</a></li><li><a href="PubSub.topicNames.html">topicNames</a></li><li><a href="resetCVV.html">resetCVV</a></li><li><a href="resetPaymentDetails.html">resetPaymentDetails</a></li><li><a href="SearchRestClient.html">SearchRestClient</a></li><li><a href="UserViewModel.html">UserViewModel</a></li><li><a href="WidgetViewModel.html">WidgetViewModel</a></li><li><a href="WishlistContentViewModel.html">WishlistContentViewModel</a></li></ul><h3>Namespaces</h3><ul><li><a href="ko.bindingHandlers.html">bindingHandlers</a></li><li><a href="ko.extenders.html">extenders</a></li><li><a href="koValidation.html">koValidation</a></li></ul><h3>Global</h3><ul><li><a href="global.html#CCEETagProcessor">CCEETagProcessor</a></li><li><a href="global.html#isValidDeterminewhetherornotthepaymentdetailsobjectisvalidbasedonthevalidityofitscomponentparts.Thiswillnotcauseerrormessagestobedisplayedforanyobservablevaluesthatareunchangedandhaveneverreceivedfocusontherelatedformfield(s).">isValid
Determine whether or not the payment details object is valid
based on the validity of its component parts. This will not
cause error messages to be displayed for any observable values
that are unchanged and have never received focus on the
related form field(s).</a></li><li><a href="global.html#validatePaymentDetailsForceallrelevantmemberobservablestoperformtheirvalidationnow&displaytheerrors(ifany)">validatePaymentDetails
Force all relevant member observables to perform their
validation now & display the errors (if any)</a></li></ul>
</nav>
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0</a> on Mon Oct 10 2016 10:49:03 GMT+0100 (BST)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>