diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-15 04:40:37 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-15 04:40:37 +0000 |
commit | dbebcadbc14737ccd151e3225b0a2deede14b5ff (patch) | |
tree | d56ef5cc682f65af2df921c3f985a77dfc45e66c /js/lib/security.js | |
parent | 75f8dee670c207d464937cf2baf6b6898370f52a (diff) | |
download | elgg-dbebcadbc14737ccd151e3225b0a2deede14b5ff.tar.gz elgg-dbebcadbc14737ccd151e3225b0a2deede14b5ff.tar.bz2 |
Refs #2538: Added documentation to most of the JS methods missing it.
git-svn-id: http://code.elgg.org/elgg/trunk@8717 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'js/lib/security.js')
-rw-r--r-- | js/lib/security.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/js/lib/security.js b/js/lib/security.js index d449d8887..f88c6165d 100644 --- a/js/lib/security.js +++ b/js/lib/security.js @@ -5,6 +5,12 @@ elgg.provide('elgg.security'); elgg.security.token = {}; +/** + * Sets the currently active security token and updates all forms and links on the current page. + * + * @param {Object} json The json representation of a token containing __elgg_ts and __elgg_token + * @return {Void} + */ elgg.security.setToken = function(json) { //update the convenience object elgg.security.token = json; @@ -22,7 +28,7 @@ elgg.security.setToken = function(json) { }; /** - * Security tokens time out, so lets refresh those every so often + * Security tokens time out, so lets refresh those every so often. * * @todo handle error and bad return data */ @@ -70,6 +76,7 @@ elgg.security.addToken = function(data) { elgg.security.init = function() { //refresh security token every 5 minutes + //this is set in the js/elgg PHP view. setInterval(elgg.security.refreshToken, elgg.security.interval); }; |