title: Lumen HTTP Basic Authentication without use of database
body: <p>I'm creating a RESTful API using Lumen and would like to add HTTP basic Authentication for security.</p>
  
  <p>On the <code>routes.php</code> file, it set the <code>auth.basic</code> middle for every routes:</p>
  
  <pre><code>$app-&gt;get('profile', ['middleware' =&gt; 'auth.basic', function() {
       // logic here
  }]);
  </code></pre>
  
  <p>Now when I access <code>http://example-api.local/profile</code> I am now prompted with the HTTP basic authentication, which is good. But when I try to login, I get this error message: <code>Fatal error: Class '\App\User' not found in C:\..\vendor\illuminate\auth\EloquentUserProvider.php on line 126</code></p>
  
  <p>I do not want the validation of users to be done on a database since I will just have one credential so most likely it will just get the username and password on a variable and validate it from there.</p>
  
  <p>Btw, I reference it thru this <a href="https://laracasts.com/lessons/basic-authentication-in-four-minutes" rel="noreferrer">laracast tutorial</a>. Though it is a Laravel app tutorial, I am implementing it on Lumen app.</p>