Go to the source code of this file.
elgg provide |
( |
'elgg.security.token' |
| ) |
|
Hold security-related data here.
elgg register_hook_handler |
( |
'boot' |
, |
|
|
'system' |
, |
|
|
elgg.security. |
init |
|
) |
| |
Initial value:= function() {
elgg.security.tokenRefreshTimer = setInterval(
elgg.security.refreshToken,
elgg.security.interval);
}
Definition at line 102 of file security.js.
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-9
a-f]*/,
'__elgg_token=' + json.__elgg_token);
});
}
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 |
elgg security tokenRefreshTimer = null |