marcoazn89/route-protection

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

Installs: 7 475

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/marcoazn89/route-protection

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

This package is not auto-updated.

Last update: 2025-09-28 01:44:00 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']
    ]
]