semitexa/api
最新稳定版本:2026.05.08.1640
Composer 安装命令:
composer require semitexa/api
包简介
Semitexa API - external API product layer with machine credentials, versioned routes, and M2M contracts
README 文档
README
External API product layer for Semitexa with machine-to-machine authentication, versioned routes, and structured error envelopes.
Purpose
Provides the opt-in external API surface for Semitexa applications. Routes marked with #[ExternalApi] receive machine-facing JSON error envelopes for domain failures, Bearer token M2M authentication via MachineAuthHandler, and API versioning with #[ApiVersion] including deprecation and sunset headers.
Role in Semitexa
Depends on semitexa/core and semitexa/auth. Enriches Core's route metadata with external_api and api_version extension keys via ApiRouteMetadataResolver. Internal routes remain completely unaffected by this package.
Key Features
#[ExternalApi]attribute for opt-in API route designation#[ApiVersion]with deprecation and sunset metadata headersMachineAuthHandlersupporting Bearer{id}:{secret}token formatExternalApiExceptionMapperproducing machine-readable JSON error envelopes forDomainExceptionroutes and falling back to Core's generic 500 response for unexpected throwablesMachinePrincipalimplementingAuthenticatableInterfaceMachineCredentialentity with scopes, revocation, and audit support
Notes
Only routes explicitly marked with #[ExternalApi] receive API behavior. All other routes continue to use Core's default exception mapping and response handling.
统计信息
- 总下载量: 76
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-23