Search code examples
javajqueryajaxsaml-2.0attask

How to terminate user session from Attask (Workfront) using SAML?


I have integrated Workfront with my application using SAML2. I am able to login with IDP (ADFS) into my system and I can easily access Workfront with the help of SAML token. No need to pass any credential or visit IDP page if user session exist already in my application.

I am using href link to access Workfront from my application as WF enabled Cross-origin resource sharing (CORS) so I can not embed into my application.

Now I want to logout from my application and Workfront as well using global logout which will terminate logged in user session from IDP also. But I am not able call Workfront logout URL for SAML from client side code of my application.

Can anybody help me to terminate user session from Workfront application?


Solution

  • I solved the above problem by using https://domain.attask-ondemand.com/logout this url. Now user is able to log out globally from IDP and SP(WF) as well by hitting the given url from my SP. However this URL is not accessible from outside domain due to CORS, so I opened this link in new iframe. Used below code to logout from WF.

        iframe = document.createElement('iframe');
        iframe.id = "hiddenWFlogout";
        iframe.style.display = 'none';
        iframe.src = 'https://domain.attask-ondemand.com/logout';
        document.body.appendChild(iframe);