dbp / relay-authorization-bundle
A template bundle for the Relay API gateway
Installs: 421
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 2
Type:symfony-bundle
Requires
- php: >=8.1
- ext-json: *
- api-platform/core: ^2.7.11 || ^3.2
- dbp/relay-core-bundle: ^0.1.153
- doctrine/doctrine-migrations-bundle: ^3.3
- doctrine/migrations: ^3.7
- doctrine/orm: ^2.18
- symfony/config: ^5.4 | ^6.4
- symfony/dependency-injection: ^5.4 | ^6.4
- symfony/framework-bundle: ^5.4.30 | ^6.4
- symfony/http-kernel: ^5.4 | ^6.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.50
- phpstan/phpstan: ^1.10.59
- phpstan/phpstan-phpunit: ^1.3.16
- phpstan/phpstan-symfony: ^1.3.7
- phpunit/phpunit: ^9.6.17
- symfony/browser-kit: ^5.4 | ^6.4
- symfony/http-client: ^5.4 | ^6.4
- symfony/monolog-bundle: ^3.10
- symfony/phpunit-bridge: ^7.0.4
- vimeo/psalm: ^5.22.2
This package is auto-updated.
Last update: 2024-05-06 02:02:52 UTC
README
DbpRelayAuthorizationBundle
GitHub | Packagist | Frontend Application | Authorization Website
The authorization bundle provides an API for managing group and user authorization attributes.
Bundle Installation
You can install the bundle directly from packagist.org.
composer require dbp/relay-authorization-bundle
Integration into the Relay API Server
- Add the bundle to your
config/bundles.php
beforeDbpRelayCoreBundle
:
... Dbp\Relay\AuthorizationBundle\DbpRelayAuthorizationBundle::class => ['all' => true], Dbp\Relay\CoreBundle\DbpRelayCoreBundle::class => ['all' => true], ];
If you were using the DBP API Server Template as template for your Symfony application, then this should have already been generated for you.
- Run
composer install
to clear caches
Configuration
For this create config/packages/dbp_relay_authorization.yaml
in the app with the following
content:
dbp_relay_authorization:
If you were using the DBP API Server Template as template for your Symfony application, then the configuration file should have already been generated for you.
For more info on bundle configuration see https://symfony.com/doc/current/bundles/configuration.html.
Development & Testing
- Install dependencies:
composer install
- Run tests:
composer test
- Run linters:
composer run lint
- Run cs-fixer:
composer run cs-fix
Bundle dependencies
Don't forget you need to pull down your dependencies in your main application if you are installing packages in a bundle.
# updates and installs dependencies of dbp/relay-authorization-bundle
composer update dbp/relay-authorization-bundle
Scripts
Database migration
Run this script to migrate the database. Run this script after installation of the bundle and after every update to adapt the database to the new source code.
php bin/console doctrine:migrations:migrate --em=dbp_relay_authorization_bundle
Error codes
/authorization/groups
POST
relay:errorId | Status code | Description | relay:errorDetails | Example |
---|
/authorization/groups/{identifier}
GET
relay:errorId | Status code | Description | relay:errorDetails | Example |
---|