Laravel Api受护照OAuth保护

问题描述 投票:0回答:1

嗨,我想在我自己的网站上使用我的api,我按照doc中的所有步骤进行操作并成功创建api,当我通过postman工具测试它时它工作正常。但我想在我的网站上没有任何身份验证过程的情况下访问这些api供我个人使用。

Route::group([
'namespace'=>'Product',
'prefix'=>'product',
'middleware' => 'auth:api'
],function(){
Route::get('all','ProductApiController@allProducts');
});

当我评论auth:api中间件然后它返回数据作为axios响应,但如果我这样做,每个人都可以使用我的api链接没有任何身份验证过程。

laravel api
1个回答
最新问题
© www.soinside.com 2019 - 2024. All rights reserved.