marcoazn89/route-protection

There is no license information available for the latest version (dev-master) of this package.

dev-master 2016-10-11 21:54 UTC

This package is not auto-updated.

Last update: 2024-04-27 17:20:19 UTC


README

Module to protect your routes based on roles + access type

OAuth2 configuration

// Example. I bet you might want to request to make them work also based on GET, POST, etc, but for now get creative with the roles.

$config =  [
    '/api/account[/]' => [
      'admin' => ['web','curl']
    ],
    '/api/account/{id}[/]' => [
      'admin' => ['web','curl'],
      'partner' => ['web'],
      'user' => ['web']
    ]
]