The curl parameter "--user" just passes basic auth info in the HTTP request. You can easily use the BasicAuth middleware => http://laravel.com/docs/5.0/authentication#http-basic-authentication
However I don't think this is the best approach. If you have several servers/services doing requests on your Laravel instance, you should at least use a seperate user for each one. Otherwise if one of your passwords get compromised you have to change credentials on all servers.
A better solution in my opinion would be to use an access (or authentication) token based mechansim or even better certificates (if there are critical data involved). But that really depends on what kind of data you process.
Thanks Marcod
http://laravel.com/docs/5.0/authentication
i had added below line in htaccess as mention in above url
RewriteCond %{HTTP:Authorization} ^(.+)$
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
i remove this line and working properly usig auth.basic as middleware
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community