snelg/cakephp-3-cas
最新稳定版本:1.2.3
Composer 安装命令:
composer require snelg/cakephp-3-cas
包简介
CAS Authentication for CakePHP 3
README 文档
README
Very basic CAS Authentication for CakePHP 3.
Installing via composer
Install into your project using composer. For existing applications you can add the following to your composer.json file:
"require": {
"snelg/cakephp-3-cas": "~1.0"
}
And run php composer.phar update
Usage
Load the Cake AuthComponent, including CasAuth.Cas as an authenticator. For example:
$this->loadComponent('Auth'); $this->Auth->config('authenticate', [ 'CasAuth.Cas' => [ 'hostname' => 'cas.mydomain.com', 'uri' => 'authpath']]);
Or combine the load and configuration into one step:
$this->loadComponent('Auth', [ 'authenticate' => [ 'CasAuth.Cas' => [ 'hostname' => 'cas.mydomain.com', 'uri' => 'authpath']]]);
CAS parameters can be specified during Auth->config as above, or by writing to the "CAS" key in Configure::write, e.g.
Configure::write('CAS.hostname', 'cas.myhost.com'); Configure::write('CAS.port', 8443);
Parameters
- hostname is required
- port defaults to 443
- uri defaults to '' (an empty string)
- debug (optional) if true, then phpCAS will write debug info to logs/phpCAS.log
- cert_path (optional) if set, then phpCAS will use the specified CA certificate file to verify the CAS server
- curlopts (optional) key/value paired array of additional CURL parameters to pass through to phpCAS::setExtraCurlOption, e.g.
'curlopts' => [CURLOPT_PROXY => 'http://proxy:5543', CURLOPT_CRLF => true]
统计信息
- 总下载量: 3.49k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-07-14