title: Shibboleth authentication for an Angular single page application (SPA)
body: <p>Is it possible to use Shibboleth within an Angular4 SPA?
  If yes, how?</p>
  
  <p>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.</p>
  
  <p>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 <code>/shibprotected/getJWT</code>, 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?</p>
  
  <p>May I use cookies for this task?</p>