[英]What's the correct JSON format for authentication with F3 PHP?
http://fatfreeframework.com/auth http://fatfreeframework.com/auth
http://fatfreeframework.com/jig http://fatfreeframework.com/jig
When using a JIG database with JSON, what's the correct JSON file format to make it work? 当将JIG数据库与JSON结合使用时,要使其正常工作,正确的JSON文件格式是什么? Unfortunately, the documentation is lacking a bit and only gives incomplete snippets of code.
不幸的是,文档缺少一点,仅给出了不完整的代码片段。
just add some records with the 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();
Then the json file will be created, with an auto-generated record id, which looks like: 然后,将使用自动生成的记录ID创建json文件,如下所示:
{
"548723b9f06c78.10153217": {
"username": "userA",
"password": "57d82jg05"
},
"54f9c763934745.48648465": {
"username": "userB",
"password": "kbjd94973"
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.