saiban-lab / auth
身份验证库
1.0.19
2018-11-03 20:49 UTC
Requires
- php: >=5.3.3
- gap-db/orm: 1.0.*
README
需求
PHP > 5.4.0
gap-orm/gap >= 1.*
设置
如果你使用 Composer 为项目依赖,请从 Safan 主配置中启用 "memcache",并在 "composer.json" 中添加以下内容:
"require": {
"safan-lab/auth": "1.*"
}
更新模块配置列表 - safan-framework-standard/application/Settings/modules.config.php
<?php
return [
// Safan Framework default modules route
'Safan' => 'vendor/safan-lab/safan/Safan',
'SafanResponse' => 'vendor/safan-lab/safan/SafanResponse',
// Write created or installed modules route here ... e.g. 'FirstModule' => 'application/Modules/FirstModule'
'GapOrm' => 'vendor/gap-db/orm/GapOrm',
'Authentication' => 'vendor/safan-lab/auth/Authentication',
];
添加配置 - safan-framework-standard/application/Settings/main.config.php
<?php
'init' => [
...
'auth' => [
'class' => 'Authentication\AuthManager',
'method' => 'init',
'params' => [
'token' => 'any_token',
'driver' => 'memcacheAuth',
'crossDomain' => false
]
],
...
]