diff options
author | Camil Staps | 2015-05-07 15:43:22 +0300 |
---|---|---|
committer | Camil Staps | 2015-05-07 15:43:22 +0300 |
commit | 9de17f00941e56d7c063241e3f87bfeb70e50276 (patch) | |
tree | 8ba3da597a2d07ffb3dbe52c57c8ef1100e50358 | |
parent | Login (diff) |
HTTP authentication
-rw-r--r-- | src/js/Botleagues.js | 4 | ||||
-rw-r--r-- | src/js/BotleaguesCallback.js | 4 | ||||
-rw-r--r-- | src/js/BotleaguesFrontend.js | 6 |
3 files changed, 10 insertions, 4 deletions
diff --git a/src/js/Botleagues.js b/src/js/Botleagues.js index fd8ed21..efc56d8 100644 --- a/src/js/Botleagues.js +++ b/src/js/Botleagues.js @@ -19,4 +19,8 @@ Botleagues.request = function(user_options, callback) { delete options['endpoint']; jQuery.ajax(url, options); +}; + +Botleagues.redirect = function(user_options) { + window.location = Botleagues.url + '/' + user_options['endpoint']; };
\ No newline at end of file diff --git a/src/js/BotleaguesCallback.js b/src/js/BotleaguesCallback.js index 271deb0..1efe8d6 100644 --- a/src/js/BotleaguesCallback.js +++ b/src/js/BotleaguesCallback.js @@ -4,4 +4,6 @@ BotleaguesCallback.register = function(data) { console.log(data); }; -BotleaguesCallback.login = function(data) {}
\ No newline at end of file +BotleaguesCallback.login = function(data) { + console.log(data); +}
\ No newline at end of file diff --git a/src/js/BotleaguesFrontend.js b/src/js/BotleaguesFrontend.js index 37e84d4..461ce92 100644 --- a/src/js/BotleaguesFrontend.js +++ b/src/js/BotleaguesFrontend.js @@ -1,7 +1,7 @@ function BotleaguesFrontend(){} BotleaguesFrontend.login = function() { - Botleagues.request({ - endpoint: 'user/login' - }, BotleaguesCallback.login); + Botleagues.redirect({ + endpoint: 'user/login?redirect=http://local.botleagues.camilstaps.nl/' + }); };
\ No newline at end of file |