Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/271.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php lumen中的用户登录验证_Php_Authentication_Lumen 5.2 - Fatal编程技术网

Php lumen中的用户登录验证

Php lumen中的用户登录验证,php,authentication,lumen-5.2,Php,Authentication,Lumen 5.2,我尝试像在laravel5中通常做的那样进行身份验证,但它显示出以下错误: AuthManager.php第152行中的ErrorException:未定义索引:提供程序 之后,我尝试以下链接 然后得到以下错误: call\u user\u func\u array()要求参数1为有效回调, 类“Illumb\Auth\TokenGuard”没有“尝试”方法 现在我被困在这里了 那么,我应该为用户登录身份验证做些什么呢?如果您在路由中使用身份验证中间件,请确保取消对bootstrap/app.

我尝试像在laravel5中通常做的那样进行身份验证,但它显示出以下错误:

AuthManager.php第152行中的ErrorException:未定义索引:提供程序

之后,我尝试以下链接

然后得到以下错误:

call\u user\u func\u array()要求参数1为有效回调, 类“Illumb\Auth\TokenGuard”没有“尝试”方法

现在我被困在这里了
那么,我应该为用户登录身份验证做些什么呢?

如果您在路由中使用身份验证中间件,请确保取消对bootstrap/app.php文件中相应行的注释

$app->routeMiddleware([
    'auth' => App\Http\Middleware\Authenticate::class,
]);

如果在路由中使用Auth中间件,请确保取消对bootstrap/app.php文件中相应行的注释

$app->routeMiddleware([
    'auth' => App\Http\Middleware\Authenticate::class,
]);

谢谢你的建议,但我还是收到了这个错误:AuthManager.php第152行中的ErrorException:Undefined index:Provider您是否有类似的auth配置文件?我似乎记得必须创造一个像拉威尔使用的。。。谢谢你的建议,但我还是收到了这个错误:AuthManager.php第152行中的ErrorException:Undefined index:Provider您是否有类似的auth配置文件?我似乎记得必须创造一个像拉威尔使用的。。。