2017 © Pedro Peláez
 

library javert

authentication, authorization, oauth package

image

adamsmeat/javert

authentication, authorization, oauth package

  • Tuesday, April 23, 2013
  • by adamsmeat
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Javert

Authentication, Authorization, OAuth package, (*1)

Installation

```php 'Adamsmeat\Javert\JavertServiceProvider', 'aliases' => array( 'Helpers' => 'Adamsmeat\Javert\JavertFacade', ) ); ?>, (*2)

Javert objects

  • JavertResource -(blog, forum, thread, user, etc.) -(resources will have attributes(id, )), (*3)

  • JavertIntention (edit.article, update.profile, hide.page, etc.), (*4)

  • JavertRestriction (restriction::(edit.article))
  • JavertPrivilege (JavertPrivilege::can(edit.article))
  • JavertUser ()
  • JavertGroup (mod[editor, user, writer]) - collection of roles
  • JavertRole (article.editor[edit, publish, unpublish])

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)

The Versions

23/04 2013

dev-master

9999999-dev

authentication, authorization, oauth package

  Sources   Download

The Requires

 

by Paolo Umali