How to sign-in a user based on custom HTTP headers in Drupal 8?
That sounds like a very insecure way of allowing admin access to your site.  Seems like a hacker just has to fake the header in the request to get access.
That said, you probably want to look at the various http authentication modules for Drupal 8 (E.g. google drupal 8 http authentication).  Some quick starter links about this in core are:
https://www.drupal.org/docs/8/core/modules/basic_auth/overview
https://www.drupal.org/docs/8/api/authentication-api/overview
As with most open source systems, the best way to figure out how to do something like this is to find code that does something similar and modify it to meet your needs.