rayamedia / yima-authorize
此包的最新版本(dev-master)没有可用的许可证信息。
dev-master
2015-06-18 11:19 UTC
Requires
- php: >=5.3.3
- poirot/authsystem: dev-master
- poirot/core: dev-master
- rayamedia/yima-plugin-installer: dev-master
This package is auto-updated.
Last update: 2024-09-24 04:17:45 UTC
README
[zend framework2, zf2] 身份验证
程序化登录用户
/** @var AuthService $auth */ $auth = $this->authorize('yima_authorize.sample'); $auth->getAuthAdapter()->identity()->setUserIdentity('ehsan'); $auth->getAuthAdapter()->identity()->login(); if (!$auth->isAllowed(null, new PermResource(['route_name' => 'contact']))) $auth->riseException(); die($auth->getAuthAdapter()->identity()->hasAuthenticated());