yiirocks / voyti-api
REST API subsystem for the YiiRocks Voyti Yii3 extension
Package info
pkg:composer/yiirocks/voyti-api
Fund package maintenance!
Requires
- php: >=8.3
- psr/clock: ^1.0
- psr/event-dispatcher: ^1.0
- psr/http-factory: ^1.0
- psr/http-message: ^1.0 || ^2.0
- psr/http-server-middleware: ^1.0
- yiirocks/voyti: ^1.0
- yiisoft/auth: ^3.3
- yiisoft/data: ^2.0
- yiisoft/data-db: ^1.0
- yiisoft/data-response: ^2.2
- yiisoft/http: ^1.2
- yiisoft/input-http: ^1.0
- yiisoft/router: ^4.0
- yiisoft/security: ^1.2
- yiisoft/user: ^2.3
- yiisoft/yii-console: ^2.3
Requires (Dev)
- ext-pdo_sqlite: *
- friendsofphp/php-cs-fixer: @stable
- infection/infection: ^0.34.0
- nyholm/psr7: ^1.8
- phpunit/phpunit: @stable
- rector/rector: ^2.1.1
- vimeo/psalm: ^6.0
- yiisoft/code-style: ^1.1
- yiisoft/config: ^1.6
- yiisoft/db-sqlite: ^2.0
- yiisoft/di: *
- yiisoft/mailer: ^6.1
- yiisoft/router-fastroute: ^4.0
- yiisoft/translator: ^3.0
- yiisoft/translator-message-php: ^1.0
- yiisoft/view: ^12.0
This package is auto-updated.
Last update: 2026-08-14 11:03:24 UTC
README
The REST API base package for Voyti, the Yii3 user-management extension. It carries the whole read-only and CRUD user API: JSON endpoints, bearer-token authentication, an OpenAPI 3.1 specification, and console commands to issue and revoke API tokens.
Stats for Nerds
What this is
The REST API is pluggable in Voyti: it mounts as its own route group (voyti-routes-api) and protects the endpoints with bearer tokens issued and revoked through the voyti:api-token:generate and voyti:api-token:revoke console commands. Tokens are persisted only as SHA-256 hashes and are only accepted for a configurable lifespan. A voyti/api-openapi endpoint serves the OpenAPI 3.1 specification describing the whole surface.
Requirements
- PHP 8.3+
- yiirocks/voyti
Installation
The package could be installed via composer:
composer require yiirocks/voyti-api
Its route group, middleware, service, and adapter bindings are registered automatically through the yiisoft/config plugin, so a host's config merge picks them up.
Documentation
Installation steps, the full configuration reference, the endpoint list, and the OpenAPI spec are all covered at Yii.Rocks.
Testing
# Unit tests composer phpunit # Mutation testing composer infection # Static analysis composer psalm # Code style fixer composer php-cs-fixer