Friday, March 17, 2017

How can you change the driver for the Laravel basic authentication middleware?

I would like to use the basic authentication middleware from Laravel, except not use a database behind it.

By default, the auth.basic middleware will use the email column on the user record as the "username".

Is there a way to change this to the filesystem or something other so I can simply add a username and password in a file somewhere. I just need simply security and my data is in an Elasticsearch server so I have no need for a MySQL database behind Laravel.

https://laravel.com/docs/5.4/authentication#http-basic-authentication



via Stephan-v

Advertisement