php - How to create http basic Authentication in Laravel 5? -


how create http basic authentication in laravel 5?

i have read documentation here: https://laravel.com/docs/5.0/authentication#http-basic-authentication

i want create fixed password, meaning 1 password complete site.

but still not clear me how create it.

i understand have create middleware this:

public function handle($request, closure $next) {     return auth::oncebasic() ?: $next($request); } 

but not sure else do. example, want protect route:

route::get('/', function () {     return view('welcome'); }); 

and also, store http basic password on server ?

thanks

i use package:

intervention/httpauth

then in controller want auth protect, add:

httpauth::secure(); 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -