dev-master
9999999-devauthentication, authorization, oauth package
The Requires
- php >=5.3.0
- illuminate/support 4.0.x
- adamsmeat/helpers dev-master
by Paolo Umali
authentication, authorization, oauth package
Authentication, Authorization, OAuth package, (*1)
```php 'Adamsmeat\Javert\JavertServiceProvider', 'aliases' => array( 'Helpers' => 'Adamsmeat\Javert\JavertFacade', ) ); ?>, (*2)
JavertResource -(blog, forum, thread, user, etc.) -(resources will have attributes(id, )), (*3)
JavertIntention (edit.article, update.profile, hide.page, etc.), (*4)
JavertUser
->privileges(
// resource => array of privileges
'article' => ['edit', 'publish', 'unpublish']
), (*5)
Samples: function restrict($resource_intention) { Event::fire('restrict:route_access') }, (*6)
A user visits a route '/promos'. The resource here is 'route'. restrict(route_access) how to bypass? user should have privilege(sources could be User privileges, group) function JavertUser::can('access_route', ['id'=>'1', 'route_path' => 'anasha/profile'])) { getPrivileges() }, (*7)
authentication, authorization, oauth package