marcoazn89 / route-protection
Installs: 7 469
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
This package is not auto-updated.
Last update: 2025-04-26 23:31:17 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'] ] ]