pails/auth
最新稳定版本:v1.4.5
Composer 安装命令:
composer require pails/auth
包简介
README 文档
README
An authentication and authorization plugin for pails loosely based on UserPie (userpie.com). At this point it's a near-complete rewrite.
Dependencies
- pails
- pails/activerecord
- pails/actionmailer
We recommend using composer to get the dependencies. Furthermore, we recommend not installing the dependencies for pails-auth directly, but listing pails-auth as a dependency in your pails application's composer.json file.
Installation
In the root of a pails app, run
composer require pails/auth
Configuration
Inside any controller where you want to make use of the authentication/authorization
methods, use the PailsAuthentication trait.
class DefaultController extends Pails\Controller { use PailsAuthentication; }
You can then use the before actions require_login or require_anonymous:
$before_actions = array( 'require_login' => array('except' => array('index', 'about', 'contact')) );
Two utility methods, is_logged_in and current_user, are also provided.
Support
pails-auth is a core plugin maintained and supported by Brian Parks.
统计信息
- 总下载量: 466
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2015-07-25