summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.html2
-rw-r--r--js/codeq/aaiLogin.js10
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 @@
</div>
<div class="container">
<div class="row" style="padding: 0; padding-top: 5px;">
- <iframe width="100%" height="850px" frameborder="0" scrolling="no" allowtransparency="true" src="https://codeq.si/Shibboleth.sso/Login?forceAuthn=1" id="aai_iframe"></iframe>
+ <iframe width="100%" height="850px" frameborder="0" scrolling="no" allowtransparency="true" src="" id="aai_iframe"></iframe>
</div>
</div>
</div>
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);