使用 F3 PHP 进行身份验证的正确 JSON 格式是什么?

What's the correct JSON format for authentication with F3 PHP?

http://fatfreeframework.com/auth

http://fatfreeframework.com/jig

在 JSON 中使用 JIG 数据库时,正确的 JSON 文件格式是什么?不幸的是,该文档缺少一点,只提供了不完整的代码片段。

只需使用 Jig Mapper 添加一些记录即可:

$mapper = new \DB\Jig\Mapper($db, $file);
$mapper->username = 'userA';
$mapper->password = '57d82jg05';
$mapper->save();
$mapper->reset();
$mapper->username = 'userB';
$mapper->password = 'kbjd94973';
$mapper->save();

然后将创建 json 文件,其中包含自动生成的记录 ID,如下所示:

{
    "548723b9f06c78.10153217": {
        "username": "userA",
        "password": "57d82jg05"       
    },
    "54f9c763934745.48648465": {
        "username": "userB",
        "password": "kbjd94973"       
    }
}