美食 / 安全
Gourmet 安全插件,用于快速开发 CakePHP 应用。
0.1.5
2014-02-27 13:27 UTC
Requires
- php: >=5.3.0
- composer/installers: *
- gourmet/common: *
This package is auto-updated.
Last update: 2024-08-28 01:23:04 UTC
README
@todo 编写描述
安装
Composer 包
首先,将此插件作为需求添加到您的 composer.json
{
"require": {
"cakephp/security": "*"
}
}
然后更新
php composer.phar update
这就完成了!现在您应该可以开始配置您的通道了。
子模块
$ cd /app
$ git submodule add git://github.com/gourmet/security.git Plugin/Security
克隆
$ cd /app/Plugin
$ git clone git://github.com/gourmet/security.git
配置
您需要在 app/Config/bootstrap.php
文件中启用插件
CakePlugin::load('Security');
如果您已经使用了 CakePlugin::loadAll();
,则此步骤不是必需的。
您还需要在 bootstrap.php
、config.ini
或 config.json
中定义一些 Configure
键值对。创建您自己的 蜜罐 或获取一个 QuickLink 以开始参与 社区。
bootstrap.php
<?php
Configure::write('Security.HttpBL.apiKey', 'your_api_key');
Configure::write('Security.HttpBL.honeyPot', '/your_honey_pot.php');
config.ini
[Security.HttpBL]
apiKey = your_api_key
honeyPot = /your_honey_pot.php
config.json
{
"Security": {
"HttpBL": {
"apiKey": "your_api_key",
"honeyPot": "/your_honey_pot.php"
}
}
}
使用方法
在明显添加助手到您的控制器(s)之后,将蜜罐 URL 添加到布局和/或视图中
<?php
echo $this->HoneyPot->render();
补丁与特性
- 分支
- 修改,修复
- 测试 - 这很重要,所以它不会被无意中破坏
- 提交 - 不要修改许可证、todo、版本等。(如果您更改了任何内容,请将它们提交为单独的提交,这样我在拉取时可以忽略它们)
- 拉取请求 - 主题分支的加分项
错误与反馈
http://github.com/gourmet/security/issues
许可证
版权 2013, Jad Bitar
根据 MIT 许可证 许可
文件的重分发必须保留上述版权声明。