Is it possible to use Shibboleth within an Angular4 SPA? If yes, how?
My scenario is the following: I have a SPA that can be accessed globally without login. Certain pages should only be accessed after login with Shibboleth. Therefore I'd like to authenticate the user via Shibboleth and generate a JWT for the user, which is used to authenticate against the APIs which are delivering the content for the protected page.
The problem, I am facing is, that the user has to navigate to the shibboleth-login-page on the service-provider and therefore leave the SPA to login. So I can create a JWT on a shibboleth-protected site like /shibprotected/getJWT, and redirect the user there. But how do I get the token back in my Angular-application? And how can I redirect the user back to the application then?
May I use cookies for this task?