judicaelpaquet/authorization

A authorization bundle annotation

Installs: 135

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 1

Open Issues: 0

Type:symfony-bundle

1.1.0 2016-09-13 15:11 UTC

This package is not auto-updated.

Last update: 2024-04-27 17:42:26 UTC


README

Build Status Scrutinizer Code Quality Code Coverage Total Downloads Latest Stable Version SensioLabsInsight

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