yiirocks/voyti-api

REST API subsystem for the YiiRocks Voyti Yii3 extension

Maintainers

Package info

github.com/YiiRocks/voyti-api

Homepage

pkg:composer/yiirocks/voyti-api

Transparency log

Fund package maintenance!

YiiRocks

Statistics

Installs: 1

Dependents: 0

Suggesters: 1

Stars: 0

Open Issues: 0

dev-main / 1.0.x-dev 2026-08-14 11:03 UTC

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.

Packagist Version PHP from Packagist Packagist GitHub License GitHub Workflow Status

Stats for Nerds

Coverage MSI Tests Assertions

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

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