cyberspectrum / api-platform-toolkit-bundle
Some handy toolkit for using api-platform/core more efficiently
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^7.4 || ^8.0
- ext-json: *
- api-platform/core: ^2.6.3
- symfony/config: ^5.4 || ^6.0
- symfony/dependency-injection: ^5.4 || ^6.0
- symfony/http-foundation: ^5.4 || ^6.0
- symfony/http-kernel: ^5.4 || ^6.0
Requires (Dev)
- lexik/jwt-authentication-bundle: ^2.6
- phpcq/runner-bootstrap: ^1.0@dev
- symfony/serializer: ^5.4 || ^6.0
- symfony/test-pack: ^1.0
Conflicts
- lexik/jwt-authentication-bundle: <2.6,>=3.0
- symfony/serializer: <5.4,>=7.0
This package is auto-updated.
Last update: 2024-03-04 12:57:51 UTC
README
Installation
composer require cyberspectrum/api-platform-toolkit-bundle
Configuration
api_platform_toolkit:
# Enable custom expression language providers
enable_expression_language: true
# Enable JWT handling - this can be disabled.
lexik_jwt:
# Enable documentation handling (adds the login endpoint to swagger docs).
add_documentation: true
# The default ttl if not specified in request (defaults to 3600)
default_ttl: 3600
# The login url.
login_url: '/api/login_check'
Features:
Add own providers to expression language.
This bundle supports to add tagged services to the api platform expression language.
To add your own ExpressionFunctionProviderInterface
implementor use this
service registration:
App\ExpressionLanguage\SomeExpressionLanguageProvider:
tags:
- { name: csap_toolkit.security.expression_language }
TODO
- Make PR for expression language support in
api-platform/core
. - Make JWT TTL support configuration optional.
- Add min and max value support for JWT TTL.