summaryrefslogtreecommitdiff
path: root/www/js/auth.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/auth.js')
-rw-r--r--www/js/auth.js18
1 files changed, 11 insertions, 7 deletions
diff --git a/www/js/auth.js b/www/js/auth.js
index 2624b98..f830a0a 100644
--- a/www/js/auth.js
+++ b/www/js/auth.js
@@ -20,9 +20,13 @@
* along with rhwebimport. If not, see <http://www.gnu.org/licenses/>.
*/
-var auth_username;
-var auth_fullname;
-var auth_token;
+'use strict';
+
+var Rivendell = Rivendell || {};
+
+var auth_username = null;
+var auth_fullname = null;
+var auth_token = null;
function auth_loginSuccess(data) {
if (data.status == 'OK') {
@@ -46,7 +50,7 @@ function auth_loginSuccess(data) {
}
function auth_loginError(req, status, error) {
- message = req.status + ': ' + error;
+ var message = req.status + ': ' + error;
if(req.status == 401) {
message = "Benutzer und/oder Passwort sind falsch!";
}
@@ -93,13 +97,13 @@ function auth_init() {
function auth_cleanup() {
sessionStorage.removeItem("auth_username");
- delete auth_username;
+ auth_username = null;
$("#username").val('').focus();
sessionStorage.removeItem("auth_fullname");
- delete auth_fullname;
+ auth_fullname = null;
sessionStorage.removeItem("auth_token");
- delete auth_token;
+ auth_token = null;
$("#password").val('');
}