title: Angular 9 + CAS Authentication + .NET Core Web API
body: <p>My Technology stack is as follows:</p>
  
  <ul>
  <li>.NET Core Web API (v 2.1) </li>
  <li>Angular 9 </li>
  <li>CAS Authentication Server</li>
  </ul>
  
  <p>I am building an intranet application and have the requirement to authenticate users through our CAS Authentication Server. However, I am not quite sure how to glue all the pieces together securely. </p>
  
  <p>After much research, I am unable to find anything similar to what I need to accomplish. This worries me a little -- Am I trying to glue the wrong pieces together? I chose this stack since I have some familiarity with them separately in the past. </p>
  
  <p>So here is what I am thinking I should do:</p>
  
  <ol>
  <li>In Angular, check if the user is authenticated. If not, redirect to CAS Authentication endpoint. </li>
  <li>Once Authenticated with CAS, Angular can intercept the Service Ticket from CAS and pass it to the Web API. Let the Web API determine if the ticket is valid. </li>
  <li>If the TGT is valid, the Web API issues Angular a JWT, now the front-end and back-end can securely communicate using a JWT.</li>
  </ol>
  
  <p>Is this a valid approach? I am missing something simple when it comes to Angular + Web API + CAS?</p>
  
  <p>Is there a better way? Should I reconsider my technology stack?</p>
  
  <p>I haven't tried to put this in code yet, I want to ensure this approach is secure before I spend time coding it.</p>