I am trying to implement a very simple prototype (non-production) authentication system for my API in Laravel 8. My goal is for any user with the hard coded API key to be able to use the endpoints. Otherwise, they will get a 401 error at all endpoints. Users must include the API key as a URI parameter, with the format in the below example:
'hostAddress'/api/endpoint1?apikey='APIkey'
Where 'hostAddress' represents the host ipv6 address and 'APIkey' represents the hard coded API key.
Every search I make for this problem leads me to the Laravel 8 documentation (https://laravel.com/docs/8.x/authentication). However, the authentication solutions in the documentation are much more complex than what I am looking for.
How I can implement this simple authentication system without the use of complex Laravel packages such as Passport and Sanctum?