I'm trying to configure Shibboleth Service Provider for two sites on one IIS instance:
- Frontend with static HTML - just SPA - for example site.com
- Backend with API - just REST - for example site-api.com
So, when I'm opening the first entry point I have 302 response with a redirect to IdP, after entering credentials - redirect to site.com/Shibboleth.sso/SAML2/POST and all is working fine.
My SPA is running in browser and making an AJAX request to site-api.com. And here is a problem because I have 302 response with a redirect to IdP again. In case if a browser is making request I don't have any problems, because redirect to IdP browser processing automatically. And again after authentication by session cookie on IdP it redirects to site-api.com/Shibboleth.sso/SAML2/POST.
How can I share a session between two sites? Is it possible to not have redirect after the first request to site-api.com in case if user has already been authenticated on site.com.
I have used for second site:
<ApplicationOverride id="site-api" entityID="https://site-api.com/shibboleth" />
Also, I registered ISAPI and RequestMap for site-api.com. Technically it's working as for site.com.
I guess I can share the session somehow by using attribute in XML config file, but nothing works for me. Please help. :)