title: Drupal 8 external/custom authentication provider
body: <p>I am experimenting with Drupal 8 as our customer websites. Our customers authenticate through our own authentication application at the moment which speaks to our document store (instead of MySQL) to authenticate a user and provide them with a unique session ID (JWT eventually but that's another day and conversation) which we can use to then query a REST API and get user data in any of our other self apps.</p>
  
  <p>We are moving over from an old JSP based websites to drupal as our apps are now written in Symfony 3 but want our customer websites to be Drupal 8.</p>
  
  <p>Here's the bit I am trying to work out. If I authenticate in our old website I want to be able to redirect to the Drupal 8 website with the session ID we have in our hand and use that to fetch a object back of our logged in user. I have this bit working fine but I now am in a position to say... Ok I have the user object back, the 3rd party service has said that session ID is valid so we know we are authenticated.</p>
  
  <p>Please refer to the below flow chart. I want to be able to also authenticate in Drupal 8 manually. Is this possible (I am sure it is) and if so can someone point me in the right direction as to what I need/should be doing, API's I should be calling?</p>
  
  <p><a href="https://i.stack.imgur.com/7lACm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7lACm.png" alt="enter image description here"></a></p>
  
  <p>Thank you kindly and good day :)</p>