keboola / api-bundle
Keboola API Bundle
Installs: 1 281
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 6
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.1
- keboola/permission-checker: ^2.0
- monolog/monolog: ^2.0
- symfony/dependency-injection: ^6.0
- symfony/monolog-bundle: ^3.8
- symfony/security-bundle: ^6.1
Requires (Dev)
- keboola/api-error-control: ^4.1
- keboola/coding-standard: ^14.0
- keboola/kbc-manage-api-php-client: ^7.0
- keboola/storage-api-php-client-branch-wrapper: ^3.0
- phpstan/phpstan: ^1.8
- phpstan/phpstan-phpunit: ^1.1
- phpstan/phpstan-symfony: ^1.3
- phpunit/phpunit: ^9.5
- sempro/phpunit-pretty-print: ^1.4
- symfony/framework-bundle: ^6.1
- symfony/yaml: ^6.1
README
Symfony bundle providing common functionality for Keboola API applications.
Features:
- authentication using Storage and Manage API tokens
Installation
Install the package with Composer:
composer require keboola/api-bundle
To use authentication using attributes, add the following to your config/packages/security.yaml
:
security: firewalls: attribute: lazy: true stateless: true custom_authenticators: - keboola.api_bundle.security.attribute_authenticator
Configuration
No configuration is required.
Authentication attributes are configured automatically based on API clients installed:
- to use
StorageApiTokenAuth
, installkeboola/storage-api-client
- to use
ManageApiTokenAuth
, installkeboola/kbc-manage-api-php-client
Note
If you forget to install appropriate client, you will get exception like
Service "Keboola\ApiBundle\Attribute\ManageApiTokenAuth" not found: the container inside "Symfony\Component\DependencyInjection\Argument\ServiceLocator" is a smaller service locator
License
MIT licensed, see LICENSE file.