judicaelpaquet / authorization
A authorization bundle annotation
Installs: 137
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=7.0.0
- doctrine/annotations: 1.2.7
- symfony/symfony: >=3.0.0
This package is not auto-updated.
Last update: 2025-01-18 21:47:03 UTC
README
This bundle provides various tools to rapidly secure your API with single one annotation
Installation
Add this import in your config.yml
imports: - { resource: "../../../vendor/judicaelpaquet/Authorization/Resources/config/services.yml" }
Documentation
you must add this line to can to use the security annotation :
use JudicaelPaquet\AuthorizationBundle\Annotations\Authorization;
1/ If you want juste indicate that your API is public you must write : * @Authorization(access="public")
2/ If you want juste indicate that your API is just allow for the internal call, you have to write : * @Authorization(access="private")
3/ If you want create a restriction access by IPs : * @Authorization(access="protected", ip="127.0.0.1,192.168.0.1") * @Authorization(access="protected", domain="localhost,local.com")
Installation
composer require judicaelpaquet/authorization
License
This bundle is under the MIT license. See the complete license in the bundle:
Resources/meta/LICENSE