2017 © Pedro Peláez
 

library auth

Authentication and authorization

image

jasny/auth

Authentication and authorization

  • Friday, May 19, 2017
  • by jasny
  • Repository
  • 7 Watchers
  • 31 Stars
  • 6,180 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 18 Forks
  • 0 Open issues
  • 12 Versions
  • 5 % Grown

The README.md

jasny-banner, (*1)

Jasny Auth

PHP Scrutinizer Code Quality Code Coverage Packagist Stable Version Packagist License, (*2)

Authentication, authorization and access control for Slim Framework and other PHP micro-frameworks., (*3)

Features, (*4)


Installation

Install using composer, (*5)

composer require jasny/auth

Usage

Auth is a composition class. It takes an authz, storage, and optionally a confirmation service., (*6)

use Jasny\Auth\Auth;
use Jasny\Auth\Authz\Levels;

$levels = new Levels(['user' => 1, 'moderator' => 10, 'admin' => 100]);
$auth = new Auth($levels, new AuthStorage());

session_start();
$auth->initialize();

// Later...
if (!$auth->is('admin')) {
    http_response_code(403);
    echo "Access denied";
    exit();
}

The Auth service isn't usable until it's initialized. This should be done after the session is started., (*7)

session_start();
$auth->initialize();

Documentation

The Versions

19/05 2017

dev-master

9999999-dev http://jasny.github.com/auth

Authentication and authorization

  Sources   Download

MIT

The Requires

 

The Development Requires

auth

29/12 2016

v1.0.1

1.0.1.0 http://jasny.github.com/auth

Authentication and authorization

  Sources   Download

MIT

The Requires

 

The Development Requires

auth

28/12 2016

v1.0.0

1.0.0.0 http://jasny.github.com/auth

Authentication and authorization

  Sources   Download

MIT

The Requires

 

The Development Requires

auth

26/11 2015

v1.0.0-beta9

1.0.0.0-beta9 http://jasny.github.com/auth

Authentication and level based authorization

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

auth

25/11 2015

v1.0.0-beta8

1.0.0.0-beta8 http://jasny.github.com/auth

Authentication and level based authorization

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

auth

14/11 2015

v1.0.0-beta7

1.0.0.0-beta7 http://jasny.github.com/auth

Authentication and level based authorization

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

auth

02/11 2015

v1.0.0-beta6

1.0.0.0-beta6 http://jasny.github.com/auth

Authentication and level based authorization

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

auth

25/09 2015

v1.0.0-beta5

1.0.0.0-beta5 http://jasny.github.com/auth

Authentication and level based authorization

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

auth

24/09 2015

v1.0.0-beta4

1.0.0.0-beta4 http://jasny.github.com/auth

Authentication and level based authorization

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

auth

12/11 2014

v1.0.0-beta3

1.0.0.0-beta3 http://jasny.github.com/auth

Authentication and level based authorization

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

auth

07/10 2014

v1.0.0-beta2

1.0.0.0-beta2 http://jasny.github.com/auth

Authentication and level based authorization

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

auth

07/10 2014

v1.0.0-beta1

1.0.0.0-beta1 http://jasny.github.com/auth

Authentication and level based authorization

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

auth