Introduction

A modern and framework agnostic authorization and authentication package featuring groups, permissions, custom hashing algorithms and additional security features.

The package follows the FIG standard PSR-0 to ensure a high level of interoperability between shared PHP code.

The package requires PHP 5.3+ and comes bundled with a Laravel 4 Facade and a Service Provider to simplify the optional framework integration.

Have a read through the Installation Guide and on how to Integrate it with Laravel 4.

Quick Example

Create a user

  1. Sentry::register(array(
  2. 'email' => 'john.doe@example.com',
  3. 'password' => 'foobar',
  4. ));

Authenticate a user

  1. Sentry::authenticate(array(
  2. 'email' => 'john.doe@example.com',
  3. 'password' => 'foobar',
  4. ));

Create a group

  1. Sentry::createGroup(array(
  2. 'name' => 'Subscribers',
  3. 'permissions' => array(
  4. 'admin' => 1,
  5. 'users' => 1,
  6. ),
  7. ));