summaryrefslogtreecommitdiff
path: root/js/codeq
diff options
context:
space:
mode:
Diffstat (limited to 'js/codeq')
-rw-r--r--js/codeq/aaiLogin.js10
1 files changed, 6 insertions, 4 deletions
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);