laravel 邮递员本地身份验证

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25407106/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 09:58:18  来源:igfitidea点击:

Postman localhost Authentication

apilaravelpostman

提问by Ahmed Karmous

I created an API with Laravel4 that I want to test so I'm using postman. When I input my username, my password and my URL:

我创建了一个API与Laravel4,我想考,所以我使用的邮递员。当我输入用户名、密码和 URL 时:

http://127.0.0.1/stores/public/locator/api/service/v1/store

A popup shows and tells me to enter my username and password for localhost:80. How do I solve this problem?

一个弹出窗口显示并告诉我为 localhost:80 输入我的用户名和密码。我该如何解决这个问题?

Here is the route:

这是路线

Route::resource('store', 'StoreController');

Route::filter('Apiauth', function()
{
 return Auth::basic("username");
);

Route::group(array('prefix' => 'locator/api/service/v1', 'before'=> 'Apiauth'),  function()
{
Route::resource('store', 'StoreController');
});

回答by Ahmed Karmous