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

0.4.1 2023-07-24 05:51 UTC

This package is auto-updated.

Last update: 2023-09-26 09:27:27 UTC


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, install keboola/storage-api-client
  • to use ManageApiTokenAuth, install keboola/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.