场景
在windows平台下,使用laraval/passport包,报错如下
"oauth-public.key" permissions are not correct, should be 600 or 660 instead of 666..
解决方案
$privateKey = new CryptKey('file://' . Passport::keyPath('oauth-private.key'),null,false);
分析
- crpykey类签名如下,显然第三个参数是权限验证,默认开启,故在window平台下有此报错
public function __construct($keyPath, $passPhrase = null, $keyPermissionsCheck = true)