Delegate Authentication Using Forward Authentication

We want to do the following:

  1. Traefik receives a REST call.
  2. Through the use of forward authentication (link above) the request is then routed to our authentication service.
  3. Our authentication service then performs authentication - if it passes it returns a 200 - else it returns a 401.
  4. Our third party service also inserts a header containing user info that we want forwarded with the request.
  5. When it receives a 200 Traefik sends the original request - with the body - and the new header to the appropriate service based on the routing defined.
  6. If our service returns a 401 Traefik will return a 401 back to the application.
I assume this is the endpoint that our services needs to run on.