Elgg  Version 1.9
Functions | Variables
security.js File Reference

Go to the source code of this file.

Functions

elgg provide ('elgg.security.token')
 Hold security-related data here. More...
 
elgg register_hook_handler ('boot', 'system', elgg.security.init)
 

Variables

elgg security tokenRefreshFailed = false
 
elgg security tokenRefreshTimer = null
 
elgg security setToken
 Sets the currently active security token and updates all forms and links on the current page. More...
 
elgg security init
 

Function Documentation

elgg provide ( 'elgg.security.token'  )

Hold security-related data here.

elgg register_hook_handler ( 'boot'  ,
'system ,
elgg.security.  init 
)

Variable Documentation

elgg security init
Initial value:
= function() {
elgg.security.tokenRefreshTimer = setInterval(elgg.security.refreshToken, elgg.security.interval);
}
elgg
Definition: install.js:23

Definition at line 102 of file security.js.

elgg security setToken
Initial value:
= function(json) {
elgg.security.token = json;
$('[name=__elgg_ts]').val(json.__elgg_ts);
$('[name=__elgg_token]').val(json.__elgg_token);
$('[href*="__elgg_ts"][href*="__elgg_token"]').each(function() {
this.href = this.href
.replace(/__elgg_ts=\d*/, '__elgg_ts=' + json.__elgg_ts)
.replace(/__elgg_token=[0-9a-f]*/, '__elgg_token=' + json.__elgg_token);
});
}
elgg
Definition: install.js:23
a
Definition: admin.php:97

Sets the currently active security token and updates all forms and links on the current page.

Parameters
{Object}json The json representation of a token containing __elgg_ts and __elgg_token
Returns
{Void}

Definition at line 16 of file security.js.

elgg security tokenRefreshFailed = false

Definition at line 6 of file security.js.

elgg security tokenRefreshTimer = null

Definition at line 8 of file security.js.