From 6381f087edf1c078aabf6a81ff8d72ebdca64e55 Mon Sep 17 00:00:00 2001 From: Robert Zorko Date: Thu, 15 Oct 2015 15:31:12 +0200 Subject: fixed some bugs with the AAI login after testing --- index.html | 2 +- js/codeq/aaiLogin.js | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index f34e1bc..19243ba 100644 --- a/index.html +++ b/index.html @@ -149,7 +149,7 @@
- +
diff --git a/js/codeq/aaiLogin.js b/js/codeq/aaiLogin.js index 6ea49ea..fe7bfc8 100644 --- a/js/codeq/aaiLogin.js +++ b/js/codeq/aaiLogin.js @@ -15,9 +15,6 @@ 'enter': function(){ jqDisabledOverlay.css('display', ''); - samlLoginUrl = baseSamlUrl + codeq.comms.getSid(); - jqAaiIframe.attr('src', samlLoginUrl); - jqNavigationHomeBtn.off('click');//remove the click listener of this element here jqNavBarRight.css('display','none');//hide settings etc. @@ -29,7 +26,12 @@ $('#signed-in-title').html(''); $('#screen_aai_login').css('display',''); - codeq.comms.samlLogin() + codeq.comms.connect() + .then(function(){ + samlLoginUrl = baseSamlUrl + codeq.comms.getSid(); + jqAaiIframe.attr('src', samlLoginUrl); + return codeq.comms.samlLogin(); + }) .then(function(data){ codeq.log.debug(JSON.stringify(data)); if(data.code !== 0) throw new Error('SAML login failed, code: ' + data.code + ', message: ' + data.message); -- cgit v1.2.1