this is for holding javascript data
Alec Aivazis edited How_do_we_store_the__.html
over 8 years ago
Commit id: 05444758c9f9535c67313777c3f4f950241efad0
deletions | additions
diff --git a/How_do_we_store_the__.html b/How_do_we_store_the__.html
index 8c89d8d..44b9e2e 100644
--- a/How_do_we_store_the__.html
+++ b/How_do_we_store_the__.html
...
How do we store the authentication data that we have retrieved?
Closures to the rescue! Create a function that is available globally in the success handler of the xhr request which will scope wrap the value of the data returned by the server in the closure. a read-only manner. The global scope of the closure makes the unencrypted authentication data readable outside that request and "safely" in memory in the sense that a malicious user can not modify it.