rayamedia / yima-authorize
Installs: 20
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:yima-core-module
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-10-24 04:25:49 UTC
README
[zend framework2, zf2] Authentication
Login User Programaticly
/** @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());