cyberspectrum / api-platform-toolkit-bundle
一些方便的工具包,用于更有效地使用api-platform/core
dev-master / 1.0.x-dev
2022-05-04 09:07 UTC
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
安装
composer require cyberspectrum/api-platform-toolkit-bundle
配置
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'
功能
向表达式语言添加自己的提供者。
此包支持向api平台表达式语言添加标记化服务。
要添加自己的ExpressionFunctionProviderInterface
实现,请使用此服务注册
App\ExpressionLanguage\SomeExpressionLanguageProvider:
tags:
- { name: csap_toolkit.security.expression_language }
待办事项
- 为
api-platform/core
的表达式语言支持提交PR。 - 使JWT TTL支持配置可选。
- 为JWT TTL添加最小和最大值支持。