2017 © Pedro Peláez
 

library guardian

Internal Authorisation scopes for Laravel

image

cloudoki/guardian

Internal Authorisation scopes for Laravel

  • Friday, December 2, 2016
  • by koenbetsens
  • Repository
  • 3 Watchers
  • 0 Stars
  • 300 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

Guardian

As extension to the Oauth2 Stack, Guardian provides internal Authorisation scopes for Laravel., (*1)

This package is usable in multiple Laravel versions. Right now, however, the Guardian package is only tested in Laravel 4.2 with Eloquent., (*2)

Dependencies

Oauth2-Stack - Guardian uses the Account and User models next to the Oauth2Verifier class., (*3)

Except-io-nal - The Cloudoki PHP Exception extensions are used to throw manageable errors when authorisations are not valid., (*4)

Install Laravel 5.2 MQ

Add our package as requirement in your composer file., (*5)

$ nano composer.json
"require": {
    "laravel/framework": "5.2.*",
    "cloudoki/guardian": "dev-master"
    ...


You might want to run an update. If something goes wrong, change your `minimum-stability` to `dev` in the `composer.json` file, for now.
$ composer update


The package is now installed in the project `vendor` folder. You'll need to register the package provider in your app config file next. Since Laravel 5, the Illuminate\Form is no longer part of the core pack, so you should register it as well.
$ nano config/app.php
    'providers' => [
        ...
        Collective\Html\HtmlServiceProvider::class,
        Cloudoki\OaStack\OaStackServiceProvider::class,
        Cloudoki\Guardian\GuardianServiceProvider::class
    ],

    'aliases' => [
        ...
        'Form'      => Collective\Html\FormFacade::class,
        'Guardian'  => Cloudoki\Guardian\GuardianFacade::class,
        'HTML'      => Collective\Html\HtmlFacade::class,
    ],

DB Migration

Of course, your backend workers need db access for validation. It goes something like this:, (*6)

DB Seeds

In order to create the roles required by the Guardian package itself, run the following command from the root path of the app that uses this package., (*7)

php artisan db:seed --class="Database\Seeds\GuardianRolesSeeder"

Usage

Oauth2 Stack

Please dig into the Oauth2 Stack documentation before implementing Guardian., (*8)

Access Token

The access token is requested as Input parameter, in respect to the Oauth2 Stack and MQ alignment. In a production level API request however, the access token should ALWAYS be placed in the Authorisation header of the request., (*9)

Management REST Endpoints

The Guardian package provides REST API endpoints to view and manage Rolegroups and Roles. Detailed documentation in this wiki page., (*10)

The Versions

02/12 2016

dev-lvl51

dev-lvl51 http://github.com/Cloudoki/Guardian

Internal Authorisation scopes for Laravel

  Sources   Download

MIT

The Requires

 

by Cloudoki

laravel authorisation

10/10 2016

dev-master

9999999-dev http://github.com/Cloudoki/Guardian

Internal Authorisation scopes for Laravel

  Sources   Download

MIT

The Requires

 

by Cloudoki

laravel authorisation

10/10 2016

v0.6.0

0.6.0.0 http://github.com/Cloudoki/Guardian

Internal Authorisation scopes for Laravel

  Sources   Download

MIT

The Requires

 

by Cloudoki

laravel authorisation

04/10 2016

v0.5.1

0.5.1.0 http://github.com/Cloudoki/Guardian

Internal Authorisation scopes for Laravel

  Sources   Download

MIT

The Requires

 

by Cloudoki

laravel authorisation

03/10 2016

v0.5.0

0.5.0.0 http://github.com/Cloudoki/Guardian

Internal Authorisation scopes for Laravel

  Sources   Download

MIT

The Requires

 

by Cloudoki

laravel authorisation

25/03 2016

dev-lvel4

dev-lvel4 http://github.com/Cloudoki/Guardian

Internal Authorisation scopes for Laravel

  Sources   Download

MIT

The Requires

 

by Cloudoki

laravel authorisation

25/03 2016

v0.4.1

0.4.1.0 http://github.com/Cloudoki/Guardian

Internal Authorisation scopes for Laravel

  Sources   Download

MIT

The Requires

 

by Cloudoki

laravel authorisation

28/01 2016

v0.4

0.4.0.0 http://github.com/Cloudoki/Guardian

Internal Authorisation scopes for Laravel

  Sources   Download

MIT

The Requires

 

by Cloudoki

laravel authorisation